Struct HudTransformGesture
One scale, deform or rotate gesture dragged across the preview, in the element's displayed space.
Inherited Members
Namespace: Serenity.GameUi.Application.Placement
Assembly: Serenity.GameUi.Application.dll
Syntax
public readonly struct HudTransformGesture
Remarks
Pointer vectors run from a fixed point to the mouse, in screen pixels with +Y down — the same convention HudDragGesture uses. The fixed point itself is already in container-local reference units with +Y up: it is read off the rendered rig rather than dragged, so it needs no screen conversion.
Constructors
HudTransformGesture(float, float, float, float, float, float, float, float, float, float, float, float, float, float)
Creates a scale, deform or rotate gesture.
Declaration
public HudTransformGesture(float startScale, float startRotationDegrees, float startVectorX, float startVectorY, float currentVectorX, float currentVectorY, float fixedPointX, float fixedPointY, float scaleSnapStep, float rotationSnapDegrees, float minScale, float maxScale, float startStretchX = 1, float startStretchY = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| float | startScale | The element's scale when the gesture began. |
| float | startRotationDegrees | The element's authored rotation when the gesture began. |
| float | startVectorX | Horizontal component of the fixed-point-to-pointer vector at gesture start. |
| float | startVectorY | Vertical component of the fixed-point-to-pointer vector at gesture start. |
| float | currentVectorX | Horizontal component of the fixed-point-to-pointer vector this frame. |
| float | currentVectorY | Vertical component of the fixed-point-to-pointer vector this frame. |
| float | fixedPointX | Horizontal position of the point that must not move. |
| float | fixedPointY | Vertical position of the point that must not move. |
| float | scaleSnapStep | Grid step the resulting scale or stretch is rounded to. |
| float | rotationSnapDegrees | Grid step the resulting rotation is rounded to, in degrees. |
| float | minScale | The lowest scale or stretch the gesture may produce. |
| float | maxScale | The highest scale or stretch the gesture may produce. |
| float | startStretchX | The element's stretch along its own local X axis when the gesture began. |
| float | startStretchY | The element's stretch along its own local Y axis when the gesture began. |
Fields
CurrentVectorX
Horizontal component of the vector from the fixed point to the pointer this frame.
Declaration
public readonly float CurrentVectorX
Field Value
| Type | Description |
|---|---|
| float |
CurrentVectorY
Vertical component of the vector from the fixed point to the pointer this frame.
Declaration
public readonly float CurrentVectorY
Field Value
| Type | Description |
|---|---|
| float |
FixedPointX
Horizontal position of the point that must not move, in container-local reference units.
Declaration
public readonly float FixedPointX
Field Value
| Type | Description |
|---|---|
| float |
FixedPointY
Vertical position of the point that must not move, in container-local reference units.
Declaration
public readonly float FixedPointY
Field Value
| Type | Description |
|---|---|
| float |
MaxScale
The highest scale or stretch the gesture may produce.
Declaration
public readonly float MaxScale
Field Value
| Type | Description |
|---|---|
| float |
MinScale
The lowest scale or stretch the gesture may produce.
Declaration
public readonly float MinScale
Field Value
| Type | Description |
|---|---|
| float |
RotationSnapDegrees
Grid step the resulting rotation is rounded to, in degrees. Zero or less means free rotation.
Declaration
public readonly float RotationSnapDegrees
Field Value
| Type | Description |
|---|---|
| float |
ScaleSnapStep
Grid step the resulting scale or stretch is rounded to. Zero or less means free scaling.
Declaration
public readonly float ScaleSnapStep
Field Value
| Type | Description |
|---|---|
| float |
StartRotationDegrees
The element's authored rotation, in degrees, when the gesture began.
Declaration
public readonly float StartRotationDegrees
Field Value
| Type | Description |
|---|---|
| float |
StartScale
The element's scale when the gesture began.
Declaration
public readonly float StartScale
Field Value
| Type | Description |
|---|---|
| float |
StartStretchX
The element's stretch along its own local X axis when the gesture began.
Declaration
public readonly float StartStretchX
Field Value
| Type | Description |
|---|---|
| float |
StartStretchY
The element's stretch along its own local Y axis when the gesture began.
Declaration
public readonly float StartStretchY
Field Value
| Type | Description |
|---|---|
| float |
StartVectorX
Horizontal component of the vector from the fixed point to the pointer when the gesture began.
Declaration
public readonly float StartVectorX
Field Value
| Type | Description |
|---|---|
| float |
StartVectorY
Vertical component of the vector from the fixed point to the pointer when the gesture began.
Declaration
public readonly float StartVectorY
Field Value
| Type | Description |
|---|---|
| float |