class

MGraphicsAnimHost

Transparent single-child wrapper the widget factory inserts around every node an animation targets. Layout-transparent always: it reports the child's desired size and hands the child a rect of its full allotted size. Animation

Module
MiriGraphics
Header
#include "MiriGraphics/Widgets/MGraphicsAnimHost.h"
Namespace
Miri

Public functions

ReturnsNameDescription
MiriVec2ComputeDesiredSize
voidArrangeChildren
int32_tOnPaint
const char*GetTypeName
boolCanCacheDesiredSize
boolCanSkipArrange
boolCanRetainPaint
voidOnMouseEnter
voidOnMouseLeave
voidSetHoverCallback
voidSetAnimTranslationX
voidSetAnimTranslationY
voidSetAnimScale
voidSetAnimOpacity
voidSetAnimRotation
voidResetAnimState
MiriVec2GetAnimTranslation
floatGetAnimScale
floatGetAnimOpacity
floatGetAnimRotation
MiriMat3BuildRotationMatrixRotation about the child's centre, in absolute pixels.
MiriMat3BuildRenderTransformScale then rotation about the child's centre; identity at rest.
boolHasRenderTransform
voidSetDesignUnitScaleThe design-pixel → viewport-pixel factor translations are multiplied by.
floatGetDesignUnitScale
floatResolveDesignUnitScaleThe scale of the screen root this host sits under, so two stacks of different sizes (split screen, a second PIE window) never share one value.

Function details

ComputeDesiredSize

C++
MiriVec2 ComputeDesiredSize(float scale) const override

ArrangeChildren

C++
void ArrangeChildren(const CGeometry& geo) override

OnPaint

C++
int32_t OnPaint(const CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& renderer, int32_t layerId) const override

GetTypeName

C++
const char* GetTypeName() const override

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

CanSkipArrange

C++
bool CanSkipArrange() const override

CanRetainPaint

C++
bool CanRetainPaint() const override

OnMouseEnter

C++
void OnMouseEnter(const CGeometry& geo, const CPointerEvent& event) override

OnMouseLeave

C++
void OnMouseLeave(const CPointerEvent& event) override

SetHoverCallback

C++
void SetHoverCallback(std::function<void(bool)> callback)

SetAnimTranslationX

C++
void SetAnimTranslationX(float designUnits)

SetAnimTranslationY

C++
void SetAnimTranslationY(float designUnits)

SetAnimScale

C++
void SetAnimScale(float scale)

SetAnimOpacity

C++
void SetAnimOpacity(float opacity)

SetAnimRotation

C++
void SetAnimRotation(float degrees)

ResetAnimState

C++
void ResetAnimState()

GetAnimTranslation

C++
MiriVec2 GetAnimTranslation() const

GetAnimScale

C++
float GetAnimScale() const

GetAnimOpacity

C++
float GetAnimOpacity() const

GetAnimRotation

C++
float GetAnimRotation() const

BuildRotationMatrix

C++
MiriMat3 BuildRotationMatrix(const CGeometry& childGeo) const

Rotation about the child's centre, in absolute pixels. Identity while the rotation track is at zero, which is what keeps the untouched UI on the renderer's no-transform fast path.

BuildRenderTransform

C++
MiriMat3 BuildRenderTransform(const CGeometry& childGeo) const

Scale then rotation about the child's centre; identity at rest.

HasRenderTransform

C++
bool HasRenderTransform() const

SetDesignUnitScale

C++
static void SetDesignUnitScale(float scale)

The design-pixel → viewport-pixel factor translations are multiplied by. The screen-root canvas writes it at the top of every arrange pass, so hosts below it read the value of the screen they belong to.

GetDesignUnitScale

C++
static float GetDesignUnitScale()

ResolveDesignUnitScale

C++
float ResolveDesignUnitScale() const

The scale of the screen root this host sits under, so two stacks of different sizes (split screen, a second PIE window) never share one value.

Generated from MiriGraphics/Widgets/MGraphicsAnimHost.h via mirigraphics.json · Dec 5, 2026Version 1.1.0