class

CGeometry

Module
Miri
Header
#include "Miri/Framework/CGeometry.h"
Namespace
Miri

Constructors

SignatureNameDescription
CGeometry() = defaultCGeometry
CGeometry(const MiriVec2& localPosition, const MiriVec2& localSize, const CMiriR…CGeometry

Public functions

ReturnsNameDescription
CGeometryMakeRootRoot geometry covering the whole surface
CGeometryMakeChildChild offset within this parent
CGeometryMakeChildChild with an explicit transform instead of an offset
CGeometryMakeChildTransformedA child whose layout rect stays axis-aligned but whose pixels are painted through an extra absolute-space transform.
CGeometryWithPaintTransformThe 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.
MiriVec2GetLocalSize
floatGetLocalWidth
floatGetLocalHeight
MiriVec2GetAbsolutePosition
MiriVec2GetAbsoluteSize
MiriRectGetAbsoluteRect
MiriRectGetPaintAbsoluteRect
floatGetScale
const CMiriRenderTransform&GetAccumulatedRenderTransform
const MiriMat3&GetPaintTransform
boolHasPaintTransform
MiriVec2AbsoluteToLocalSpaceMaps a screen-space point into the widget's own axis-aligned layout space.
boolIsUnderLocation

Function details

CGeometry

C++
CGeometry() = default

CGeometry

C++
CGeometry(const MiriVec2& localPosition, const MiriVec2& localSize, const CMiriRenderTransform& accumulatedTransform, float scale = 1.0f) : m_localPosition(localPosition), m_localSize(localSize), m_accumulatedTransform(accumulatedTransform), m_scale(scale)

MakeRoot

C++
static CGeometry MakeRoot(float width, float height, float scale = 1.0f)

Root geometry covering the whole surface

MakeChild

C++
CGeometry MakeChild(const MiriVec2& localOffset, const MiriVec2& localSize) const

Child offset within this parent

MakeChild

C++
CGeometry MakeChild(const MiriVec2& localSize, const CMiriRenderTransform& localTransform) const

Child with an explicit transform instead of an offset

MakeChildTransformed

C++
CGeometry MakeChildTransformed(const MiriVec2& localOffset, const MiriVec2& localSize, const MiriMat3& absoluteTransform) const

A 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

C++
CGeometry WithPaintTransform(const MiriMat3& absoluteTransform) const

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.

GetLocalSize

C++
MiriVec2 GetLocalSize() const

GetLocalWidth

C++
float GetLocalWidth() const

GetLocalHeight

C++
float GetLocalHeight() const

GetAbsolutePosition

C++
MiriVec2 GetAbsolutePosition() const

GetAbsoluteSize

C++
MiriVec2 GetAbsoluteSize() const

GetAbsoluteRect

C++
MiriRect GetAbsoluteRect() const

GetPaintAbsoluteRect

C++
MiriRect GetPaintAbsoluteRect() const

GetScale

C++
float GetScale() const

GetAccumulatedRenderTransform

C++
const CMiriRenderTransform& GetAccumulatedRenderTransform() const

GetPaintTransform

C++
const MiriMat3& GetPaintTransform() const

HasPaintTransform

C++
bool HasPaintTransform() const

AbsoluteToLocalSpace

C++
MiriVec2 AbsoluteToLocalSpace(const MiriVec2& absolutePosition) const

Maps 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

C++
bool IsUnderLocation(const MiriVec2& absolutePosition) const
Generated from Miri/Framework/CGeometry.h via miri.json · Dec 5, 2026Version 1.1.0