AArcUIAnimHost
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 state only moves how that rect is drawn — translation shifts it (design pixels, scaled to the viewport by the screen-root canvas), scale and rotation are a render transform about its centre (painted, and inverted for hit testing), opacity multiplies the whole subtree through the renderer's layer stack. No setter invalidates layout: a pulsing button never re-measures or re-wraps its text.
- Module
- ArcUI
- Header
#include "ArcUI/Widgets/AArcUIAnimHost.h"- Namespace
Arcf
Public functions
| Returns | Name | Description |
|---|---|---|
ArcVec2 | ComputeDesiredSize | |
void | ArrangeChildren | |
int32_t | OnPaint | |
const char* | GetTypeName | |
void | SetAnimTranslationX | |
void | SetAnimTranslationY | |
void | SetAnimScale | |
void | SetAnimOpacity | |
void | SetAnimRotation | |
void | ResetAnimState | |
ArcVec2 | GetAnimTranslation | |
float | GetAnimScale | |
float | GetAnimOpacity | |
float | GetAnimRotation | |
ArcMat3 | BuildRotationMatrix | Rotation about the child's centre, in absolute pixels. |
ArcMat3 | BuildRenderTransform | Scale then rotation about the child's centre; identity at rest. |
bool | HasRenderTransform | |
void | SetDesignUnitScale | The design-pixel → viewport-pixel factor translations are multiplied by. |
float | GetDesignUnitScale |
Function details
ComputeDesiredSize
ArcVec2 ComputeDesiredSize(float scale) const overrideArrangeChildren
void ArrangeChildren(const CGeometry& geo) overrideOnPaint
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideGetTypeName
const char* GetTypeName() const overrideSetAnimTranslationX
void SetAnimTranslationX(float designUnits)SetAnimTranslationY
void SetAnimTranslationY(float designUnits)SetAnimScale
void SetAnimScale(float scale)SetAnimOpacity
void SetAnimOpacity(float opacity)SetAnimRotation
void SetAnimRotation(float degrees)ResetAnimState
void ResetAnimState()GetAnimTranslation
ArcVec2 GetAnimTranslation() constGetAnimScale
float GetAnimScale() constGetAnimOpacity
float GetAnimOpacity() constGetAnimRotation
float GetAnimRotation() constBuildRotationMatrix
ArcMat3 BuildRotationMatrix(const CGeometry& childGeo) constRotation 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
ArcMat3 BuildRenderTransform(const CGeometry& childGeo) constScale then rotation about the child's centre; identity at rest.
HasRenderTransform
bool HasRenderTransform() constSetDesignUnitScale
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
static float GetDesignUnitScale()