PixelLightAPI
.
|
#include <Graphics.h>
Public Member Functions | |
PLGUI_API | Graphics (Gui &cGui) |
Constructor. | |
PLGUI_API | Graphics (Gui &cGui, GraphicsImpl &cGraphicsImpl) |
Constructor. | |
PLGUI_API | ~Graphics () |
Destructor. | |
PLGUI_API Gui * | GetGui () const |
Get owner GUI. | |
PLGUI_API GraphicsImpl * | GetImpl () const |
Get implementation. | |
PLGUI_API const PLCore::List < GraphicsHint * > & | GetHints () |
Get hints. | |
PLGUI_API void | AddHint (GraphicsHint *pHint) |
Add a hint. | |
PLGUI_API void | DrawLine (const PLGraphics::Color4 &cColor, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, PLCore::uint32 nWidth=1) |
Draws a line. | |
PLGUI_API void | DrawRect (const PLGraphics::Color4 &cColor, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, PLCore::uint32 nRoundX=0, PLCore::uint32 nRoundY=0, PLCore::uint32 nWidth=1) |
Draws a rectangle. | |
PLGUI_API void | DrawBox (const PLGraphics::Color4 &cColor, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2, PLCore::uint32 nRoundX=0, PLCore::uint32 nRoundY=0) |
Draws a filled box. | |
PLGUI_API void | DrawGradientBox (const PLGraphics::Color4 &cColor1, const PLGraphics::Color4 &cColor2, float fAngle, const PLMath::Vector2i &vPos1, const PLMath::Vector2i &vPos2) |
Draws a filled box with a color gradient. | |
PLGUI_API void | DrawImage (const Image &cImage, const PLMath::Vector2i &vPos, const PLMath::Vector2i &vSize) |
Draws an image. | |
PLGUI_API void | DrawTiledImage (const Image &cImage, const PLMath::Vector2i &vPos, const PLMath::Vector2i &vSize) |
Draws an tiled image. | |
PLGUI_API void | DrawText (const Font &cFont, const PLGraphics::Color4 &cTextColor, const PLGraphics::Color4 &cBkColor, const PLMath::Vector2i &vPos, const PLCore::String &sText) |
Draws a text. | |
PLGUI_API PLCore::uint32 | GetTextWidth (const Font &cFont, const PLCore::String &sText) |
Gets the width of a given text in the current font. | |
PLGUI_API PLCore::uint32 | GetTextHeight (const Font &cFont, const PLCore::String &sText) |
Gets the height of a given text in the current font. | |
Protected Attributes | |
Gui * | m_pGui |
GraphicsImpl * | m_pGraphicsImpl |
bool | m_bManageImpl |
PLCore::List< GraphicsHint * > | m_lstHints |
Graphics class.
PLGUI_API PLGui::Graphics::Graphics | ( | Gui & | cGui | ) |
Constructor.
[in] | cGui | Owner GUI |
PLGUI_API PLGui::Graphics::Graphics | ( | Gui & | cGui, |
GraphicsImpl & | cGraphicsImpl | ||
) |
Constructor.
[in] | cGui | Owner GUI |
[in] | cGraphicsImpl | Reference to graphics implementation |
PLGUI_API PLGui::Graphics::~Graphics | ( | ) |
Destructor.
PLGUI_API Gui* PLGui::Graphics::GetGui | ( | ) | const |
Get owner GUI.
PLGUI_API GraphicsImpl* PLGui::Graphics::GetImpl | ( | ) | const |
Get implementation.
PLGUI_API const PLCore::List<GraphicsHint*>& PLGui::Graphics::GetHints | ( | ) |
Get hints.
PLGUI_API void PLGui::Graphics::AddHint | ( | GraphicsHint * | pHint | ) |
Add a hint.
[in] | pHint | GraphicsHint for the GUI renderer |
PLGUI_API void PLGui::Graphics::DrawLine | ( | const PLGraphics::Color4 & | cColor, |
const PLMath::Vector2i & | vPos1, | ||
const PLMath::Vector2i & | vPos2, | ||
PLCore::uint32 | nWidth = 1 |
||
) |
Draws a line.
[in] | cColor | Color of the line |
[in] | vPos1 | Start position |
[in] | vPos2 | End position |
[in] | nWidth | Line width |
PLGUI_API void PLGui::Graphics::DrawRect | ( | const PLGraphics::Color4 & | cColor, |
const PLMath::Vector2i & | vPos1, | ||
const PLMath::Vector2i & | vPos2, | ||
PLCore::uint32 | nRoundX = 0 , |
||
PLCore::uint32 | nRoundY = 0 , |
||
PLCore::uint32 | nWidth = 1 |
||
) |
Draws a rectangle.
[in] | cColor | Color of the line |
[in] | vPos1 | First corner |
[in] | vPos2 | Second corner |
[in] | nRoundX | Rounded border in X direction |
[in] | nRoundY | Rounded border in Y direction |
[in] | nWidth | Line width |
PLGUI_API void PLGui::Graphics::DrawBox | ( | const PLGraphics::Color4 & | cColor, |
const PLMath::Vector2i & | vPos1, | ||
const PLMath::Vector2i & | vPos2, | ||
PLCore::uint32 | nRoundX = 0 , |
||
PLCore::uint32 | nRoundY = 0 |
||
) |
Draws a filled box.
[in] | cColor | Color of the box |
[in] | vPos1 | First corner |
[in] | vPos2 | Second corner |
[in] | nRoundX | Rounded border in X direction |
[in] | nRoundY | Rounded border in Y direction |
PLGUI_API void PLGui::Graphics::DrawGradientBox | ( | const PLGraphics::Color4 & | cColor1, |
const PLGraphics::Color4 & | cColor2, | ||
float | fAngle, | ||
const PLMath::Vector2i & | vPos1, | ||
const PLMath::Vector2i & | vPos2 | ||
) |
Draws a filled box with a color gradient.
[in] | cColor1 | First color |
[in] | cColor2 | Second color |
[in] | fAngle | Clockwise angle of the gradient color (in degrees). 0° means from left to right. |
[in] | vPos1 | First corner |
[in] | vPos2 | Second corner |
PLGUI_API void PLGui::Graphics::DrawImage | ( | const Image & | cImage, |
const PLMath::Vector2i & | vPos, | ||
const PLMath::Vector2i & | vSize | ||
) |
PLGUI_API void PLGui::Graphics::DrawTiledImage | ( | const Image & | cImage, |
const PLMath::Vector2i & | vPos, | ||
const PLMath::Vector2i & | vSize | ||
) |
PLGUI_API void PLGui::Graphics::DrawText | ( | const Font & | cFont, |
const PLGraphics::Color4 & | cTextColor, | ||
const PLGraphics::Color4 & | cBkColor, | ||
const PLMath::Vector2i & | vPos, | ||
const PLCore::String & | sText | ||
) |
Draws a text.
[in] | cFont | Font to use |
[in] | cTextColor | Text color |
[in] | cBkColor | Background color |
[in] | vPos | Text position |
[in] | sText | Text |
PLGUI_API PLCore::uint32 PLGui::Graphics::GetTextWidth | ( | const Font & | cFont, |
const PLCore::String & | sText | ||
) |
Gets the width of a given text in the current font.
[in] | cFont | Font to use |
[in] | sText | Text to get the width of |
PLGUI_API PLCore::uint32 PLGui::Graphics::GetTextHeight | ( | const Font & | cFont, |
const PLCore::String & | sText | ||
) |
Gets the height of a given text in the current font.
[in] | cFont | Font to use |
[in] | sText | Text to get the height of |
Gui* PLGui::Graphics::m_pGui [protected] |
GUI instance
GraphicsImpl* PLGui::Graphics::m_pGraphicsImpl [protected] |
Graphics implementation object
bool PLGui::Graphics::m_bManageImpl [protected] |
If 'true', m_pGraphicsImpl will be destroyed in destructor
PLCore::List<GraphicsHint*> PLGui::Graphics::m_lstHints [protected] |
Rendering hints
|