logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct HudElementTransform

    The full placement of a HUD element after a scale, deform or rotate gesture.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.GameUi.Application.Placement
    Assembly: Serenity.GameUi.Application.dll
    Syntax
    public readonly struct HudElementTransform
    Remarks

    Always carries every component together: scaling, stretching or rotating about anything other than the anchor itself has to shift Offset to compensate, so a gesture that only "changes the scale" still produces a new offset alongside it. Resize only ever changes Scale, Deform only ever changes StretchX/StretchY, and Rotate only ever changes RotationDegrees — the other two always echo the gesture's own starting values back unchanged, rather than defaulting them, so a caller can never lose track of a stretch or scale it did not mean to touch.

    Constructors

    HudElementTransform(float, float, float, float, HudOffset)

    Creates a transform result.

    Declaration
    public HudElementTransform(float scale, float stretchX, float stretchY, float rotationDegrees, HudOffset offset)
    Parameters
    Type Name Description
    float scale

    The new uniform scale.

    float stretchX

    The new stretch along the element's own local X axis.

    float stretchY

    The new stretch along the element's own local Y axis.

    float rotationDegrees

    The new authored rotation, in degrees.

    HudOffset offset

    The new authored offset.

    Fields

    Offset

    The new authored offset, compensated so the gesture's fixed point held still.

    Declaration
    public readonly HudOffset Offset
    Field Value
    Type Description
    HudOffset

    RotationDegrees

    The new rotation, in authored (pre-mirror) degrees.

    Declaration
    public readonly float RotationDegrees
    Field Value
    Type Description
    float

    Scale

    The new uniform scale.

    Declaration
    public readonly float Scale
    Field Value
    Type Description
    float

    StretchX

    The new stretch along the element's own local X axis.

    Declaration
    public readonly float StretchX
    Field Value
    Type Description
    float

    StretchY

    The new stretch along the element's own local Y axis.

    Declaration
    public readonly float StretchY
    Field Value
    Type Description
    float
    In this article
    © 2026 Serenity. All Rights Reserved