GGUI::UIClip struct

One clip table entry: a document-space rect plus an offset applied to everything drawn under it.

A primitive is drawn at its position minus (MoveX, MoveY), clipped to the rect. A scrolling box's content draws under an entry holding its scroll offset, so scrolling rewrites one entry and no primitives. 48 bytes; the layout is shared with the shaders.

Public functions

auto Scale() const -> float
How much bigger it draws, on average: for anti-aliasing a pixel wide.
void ToLocal(float documentX, float documentY, float& x, float& y) const
A point drawn under it, back in the primitive's own units.

Public variables

float X
the clip rect, document space
float Y
the clip rect, document space
float Width
the clip rect, document space
float Height
float MoveX
Everything under it is drawn at M * position less (MoveX, MoveY), M = [A B; C D]: the scroll, zoom, and group transforms of the boxes it is in.
float MoveY
see MoveX
float A
see MoveX
float B
see MoveX
float C
see MoveX
float D
see MoveX
float Unused
padding to 48 bytes

Variable documentation

float GGUI::UIClip::Height

the clip rect, document space