UI rendering draw call. More...

#include <Urho3D/UI/UIBatch.h>

Collaboration diagram for Urho3D::UIBatch:
[legend]

Public Member Functions

 UIBatch ()
 Construct with defaults.
 
 UIBatch (UIElement *element, BlendMode blendMode, const IntRect &scissor, Texture *texture, PODVector< float > *vertexData)
 Construct.
 
void SetColor (const Color &color, bool overrideAlpha=false)
 Set new color for the batch. Overrides gradient.
 
void SetDefaultColor ()
 Restore UI element's default color.
 
void AddQuad (int x, int y, int width, int height, int texOffsetX, int texOffsetY, int texWidth=0, int texHeight=0)
 Add a quad.
 
void AddQuad (const Matrix3x4 &transform, int x, int y, int width, int height, int texOffsetX, int texOffsetY, int texWidth=0, int texHeight=0)
 Add a quad using a transform matrix.
 
void AddQuad (int x, int y, int width, int height, int texOffsetX, int texOffsetY, int texWidth, int texHeight, bool tiled)
 Add a quad with tiled texture.
 
void AddQuad (const Matrix3x4 &transform, const IntVector2 &a, const IntVector2 &b, const IntVector2 &c, const IntVector2 &d, const IntVector2 &texA, const IntVector2 &texB, const IntVector2 &texC, const IntVector2 &texD)
 Add a quad with freeform points and UVs. Uses the current color, not gradient. Points should be specified in clockwise order.
 
void AddQuad (const Matrix3x4 &transform, const IntVector2 &a, const IntVector2 &b, const IntVector2 &c, const IntVector2 &d, const IntVector2 &texA, const IntVector2 &texB, const IntVector2 &texC, const IntVector2 &texD, const Color &colA, const Color &colB, const Color &colC, const Color &colD)
 Add a quad with freeform points, UVs and colors. Points should be specified in clockwise order.
 
bool Merge (const UIBatch &batch)
 Merge with another batch.
 
unsigned GetInterpolatedColor (int x, int y)
 Return an interpolated color for the UI element.
 

Static Public Member Functions

static void AddOrMerge (const UIBatch &batch, PODVector< UIBatch > &batches)
 Add or merge a batch.
 

Public Attributes

UIElementelement_
 Element this batch represents.
 
BlendMode blendMode_
 Blending mode.
 
IntRect scissor_
 Scissor rectangle.
 
Texturetexture_
 Texture.
 
Vector2 invTextureSize_
 Inverse texture size.
 
unsigned color_
 Current color. By default calculated from the element.
 
PODVector< float > * vertexData_
 Vertex data.
 
unsigned vertexStart_
 Vertex data start index.
 
unsigned vertexEnd_
 Vertex data end index.
 
bool useGradient_
 Gradient flag.
 

Static Public Attributes

static Vector3 posAdjust
 Position adjustment vector for pixel-perfect rendering. Initialized by UI.
 

Detailed Description

UI rendering draw call.


The documentation for this class was generated from the following files:
  • Source/Urho3D/UI/UIBatch.h
  • Source/Urho3D/UI/UIBatch.cpp