CGeometry
- Module
- Arc
- Header
#include "Arc/Framework/CGeometry.h"- Namespace
Arcf
Constructors
| Signature | Name | Description |
|---|---|---|
CGeometry() = default | CGeometry | |
CGeometry(const ArcVec2& localPosition, const ArcVec2& localSize, const CArcRend… | CGeometry |
Public functions
| Returns | Name | Description |
|---|---|---|
CGeometry | MakeRoot | Root geometry covering the whole surface |
CGeometry | MakeChild | Child offset within this parent |
CGeometry | MakeChild | Child with an explicit transform instead of an offset |
CGeometry | MakeChildTransformed | A child whose layout rect stays axis-aligned but whose pixels are painted through an extra absolute-space transform. |
CGeometry | WithPaintTransform | The same layout rect painted through one more absolute-space transform — a widget's own render transform, applied where its parent arranges it so its whole subtree inherits it. |
ArcVec2 | GetLocalSize | |
float | GetLocalWidth | |
float | GetLocalHeight | |
ArcVec2 | GetAbsolutePosition | |
ArcVec2 | GetAbsoluteSize | |
ArcRect | GetAbsoluteRect | |
float | GetScale | |
const CArcRenderTransform& | GetAccumulatedRenderTransform | |
const ArcMat3& | GetPaintTransform | |
bool | HasPaintTransform | |
ArcVec2 | AbsoluteToLocalSpace | Maps a screen-space point into the widget's own axis-aligned layout space. |
bool | IsUnderLocation |
Function details
CGeometry
CGeometry() = defaultCGeometry
CGeometry(const ArcVec2& localPosition, const ArcVec2& localSize, const CArcRenderTransform& accumulatedTransform, float scale = 1.0f) : m_localPosition(localPosition), m_localSize(localSize), m_accumulatedTransform(accumulatedTransform), m_scale(scale)MakeRoot
static CGeometry MakeRoot(float width, float height, float scale = 1.0f)Root geometry covering the whole surface
MakeChild
CGeometry MakeChild(const ArcVec2& localOffset, const ArcVec2& localSize) constChild offset within this parent
MakeChild
CGeometry MakeChild(const ArcVec2& localSize, const CArcRenderTransform& localTransform) constChild with an explicit transform instead of an offset
MakeChildTransformed
CGeometry MakeChildTransformed(const ArcVec2& localOffset, const ArcVec2& localSize, const ArcMat3& absoluteTransform) constA child whose layout rect stays axis-aligned but whose pixels are painted through an extra absolute-space transform. The subtree keeps arranging and painting against the unrotated rect (the renderer's transform stack bends the emitted geometry); the inverse of the accumulated paint transform maps a screen pointer back onto that rect for hit testing.
WithPaintTransform
CGeometry WithPaintTransform(const ArcMat3& absoluteTransform) constThe same layout rect painted through one more absolute-space transform — a widget's own render transform, applied where its parent arranges it so its whole subtree inherits it.
GetLocalSize
ArcVec2 GetLocalSize() constGetLocalWidth
float GetLocalWidth() constGetLocalHeight
float GetLocalHeight() constGetAbsolutePosition
ArcVec2 GetAbsolutePosition() constGetAbsoluteSize
ArcVec2 GetAbsoluteSize() constGetAbsoluteRect
ArcRect GetAbsoluteRect() constGetScale
float GetScale() constGetAccumulatedRenderTransform
const CArcRenderTransform& GetAccumulatedRenderTransform() constGetPaintTransform
const ArcMat3& GetPaintTransform() constHasPaintTransform
bool HasPaintTransform() constAbsoluteToLocalSpace
ArcVec2 AbsoluteToLocalSpace(const ArcVec2& absolutePosition) constMaps a screen-space point into the widget's own axis-aligned layout space. Identity outside a rotated/scaled subtree, so the common case is the same rect test it always was.
IsUnderLocation
bool IsUnderLocation(const ArcVec2& absolutePosition) const