|
| Draw2dHelper (bool deferCalls=false) |
| Start a section of 2D drawing function calls that will render to the default viewport.
|
|
| Draw2dHelper (IDraw2d *draw2d, bool deferCalls=false) |
|
void | InitCommon (IDraw2d *draw2d, bool deferCalls) |
|
| ~Draw2dHelper () |
| End a section of 2D drawing function calls.
|
|
void | DrawImage (AZ::Data::Instance< AZ::RPI::Image > image, AZ::Vector2 position, AZ::Vector2 size, float opacity=1.0f, float rotation=0.0f, const AZ::Vector2 *pivotPoint=nullptr, const AZ::Vector2 *minMaxTexCoords=nullptr) |
| Draw a textured quad, optional rotation is counter-clockwise in degrees.
|
|
void | DrawImageAligned (AZ::Data::Instance< AZ::RPI::Image > image, AZ::Vector2 position, AZ::Vector2 size, IDraw2d::HAlign horizontalAlignment, IDraw2d::VAlign verticalAlignment, float opacity=1.0f, float rotation=0.0f, const AZ::Vector2 *minMaxTexCoords=nullptr) |
| Draw a textured quad where the position specifies the point specified by the alignment.
|
|
void | DrawQuad (AZ::Data::Instance< AZ::RPI::Image > image, IDraw2d::VertexPosColUV *verts, IDraw2d::Rounding pixelRounding=IDraw2d::Rounding::Nearest, bool clamp=false, const IDraw2d::RenderState &renderState=IDraw2d::RenderState{}) |
| Draw a textured quad where the position, color and uv of each point is specified explicitly.
|
|
void | DrawLine (AZ::Vector2 start, AZ::Vector2 end, AZ::Color color, IDraw2d::Rounding pixelRounding=IDraw2d::Rounding::Nearest, const IDraw2d::RenderState &renderState=IDraw2d::RenderState{}) |
| Draw a line.
|
|
void | DrawLineTextured (AZ::Data::Instance< AZ::RPI::Image > image, IDraw2d::VertexPosColUV *verts, IDraw2d::Rounding pixelRounding=IDraw2d::Rounding::Nearest, const IDraw2d::RenderState &renderState=IDraw2d::RenderState{}) |
| Draw a line with a texture so it can be dotted or dashed.
|
|
void | DrawRectOutlineTextured (AZ::Data::Instance< AZ::RPI::Image > image, UiTransformInterface::RectPoints points, AZ::Vector2 rightVec, AZ::Vector2 downVec, AZ::Color color, uint32_t lineThickness=0) |
| Draw a rect outline with a texture.
|
|
void | DrawText (const char *textString, AZ::Vector2 position, float pointSize, float opacity=1.0f) |
| Draw a text string. Only supports ASCII text.
|
|
AZ::Vector2 | GetTextSize (const char *textString, float pointSize) |
| Get the width and height (in pixels) that would be used to draw the given text string.
|
|
void | SetImageBlendMode (const AZ::RHI::TargetBlendState &blendState) |
| Set the blend mode used for images, default is GS_BLSRC_SRCALPHA|GS_BLDST_ONEMINUSSRCALPHA.
|
|
void | SetImageColor (AZ::Vector3 color) |
| Set the color used for DrawImage and other image drawing.
|
|
void | SetImagePixelRounding (IDraw2d::Rounding round) |
| Set whether images are rounded to have the points on exact pixel boundaries.
|
|
void | SetImageDepthState (const AZ::RHI::DepthState &depthState) |
| Set the base state (that blend mode etc is combined with) used for images, default is GS_NODEPTHTEST.
|
|
void | SetImageClamp (bool clamp) |
| Set image clamp mode.
|
|
void | SetTextFont (AZStd::string_view fontName) |
| Set the text font.
|
|
void | SetTextEffectIndex (unsigned int effectIndex) |
| Set the text font effect index.
|
|
void | SetTextColor (AZ::Vector3 color) |
| Set the text color.
|
|
void | SetTextAlignment (IDraw2d::HAlign horizontalAlignment, IDraw2d::VAlign verticalAlignment) |
| Set the text alignment.
|
|
void | SetTextDropShadow (AZ::Vector2 offset, AZ::Color color) |
| Set a drop shadow for text drawing. An alpha of zero disables drop shadow.
|
|
void | SetTextRotation (float rotation) |
| Set a rotation for the text. The text rotates around its position (taking into account alignment).
|
|
void | SetTextDepthTestEnabled (bool enabled) |
| Set wheter to enable depth test for the text.
|
|
Helper class for using the IDraw2d interface
The Draw2dHelper class is an inline wrapper that provides the convenience feature of automatically setting member options structures to their defaults and providing set functions.