logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class HudTransformPlacementTests

    Inheritance
    object
    HudTransformPlacementTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameUi.Tests.Application
    Assembly: Tests.dll
    Syntax
    public class HudTransformPlacementTests

    Constructors

    HudTransformPlacementTests()

    Declaration
    public HudTransformPlacementTests()

    Methods

    Deform_ClampsAtTheLowerBound()

    Declaration
    public void Deform_ClampsAtTheLowerBound()

    Deform_ClampsAtTheUpperBound()

    Declaration
    public void Deform_ClampsAtTheUpperBound()

    Deform_DegenerateStartVector_KeepsTheStartingStretch()

    Declaration
    public void Deform_DegenerateStartVector_KeepsTheStartingStretch()

    Deform_DoesNotChangeScaleOrRotation()

    Declaration
    public void Deform_DoesNotChangeScaleOrRotation()

    Deform_DraggingACornerHandle_ChangesBothAxesIndependently()

    Declaration
    public void Deform_DraggingACornerHandle_ChangesBothAxesIndependently()

    Deform_DraggingTheRightEdgeHandle_IncreasesOnlyStretchX()

    Declaration
    public void Deform_DraggingTheRightEdgeHandle_IncreasesOnlyStretchX()

    Deform_DraggingTheTopEdgeHandle_IncreasesOnlyStretchY()

    Declaration
    public void Deform_DraggingTheTopEdgeHandle_IncreasesOnlyStretchY()

    Deform_ForAMirroredElementWithRotation_ProducesADisplayedResultThatIsTheMirrorOfTheUnmirroredOne()

    The mirror-invariance claim in Deform(IHudPlacedElement, HudTransformGesture, HudDeformGesture)'s remarks — F·R(θ)·S·F equals R(−θ)·S — is a no-op check at rotation zero, since R(0) = R(−0). This end-to-end case uses a non-zero rotation so an incorrect sign anywhere in the mirror rotation, offset compensation or UnresolveOffset(IHudPlacedElement, HudOffset) handling would actually show up.

    Declaration
    public void Deform_ForAMirroredElementWithRotation_ProducesADisplayedResultThatIsTheMirrorOfTheUnmirroredOne()
    Remarks

    The mirrored gesture is built per the mirror relationship: it is the same real screen drag as the unmirrored gesture, seen through the mirrored quad, so every screen-space X component — the fixed point, both pointer vectors, and the deform axis — negates while every Y component stays put. Rather than hardcoding an expected offset or rotation, this resolves the mirrored result's displayed position and rotation through the same HudPlacementResolver the production code uses, and compares that back to the unmirrored result directly.

    Deform_ForAMirroredElement_ProducesTheSameStretchAsAnUnmirroredElement()

    Declaration
    public void Deform_ForAMirroredElement_ProducesTheSameStretchAsAnUnmirroredElement()

    Deform_NotDeformedAxis_IsNeverClampedOrSnapped()

    Declaration
    public void Deform_NotDeformedAxis_IsNeverClampedOrSnapped()

    Deform_NotDeformedAxis_KeepsExistingStretchUnchanged()

    Declaration
    public void Deform_NotDeformedAxis_KeepsExistingStretchUnchanged()

    Deform_PerpendicularMotionOnAnAxis_ClampsToTheFloorInsteadOfGoingNegative()

    Declaration
    public void Deform_PerpendicularMotionOnAnAxis_ClampsToTheFloorInsteadOfGoingNegative()

    Deform_PointerAtTheFixedPoint_ProducesNoNaNOrInfinity()

    Declaration
    public void Deform_PointerAtTheFixedPoint_ProducesNoNaNOrInfinity()

    Deform_SnapsStretchToTheStep()

    Declaration
    public void Deform_SnapsStretchToTheStep()

    Deform_WithTheOppositeEdgeAsFixedPoint_KeepsThatEdgeStill()

    Declaration
    public void Deform_WithTheOppositeEdgeAsFixedPoint_KeepsThatEdgeStill()

    HudElementBasis_MirroringAPointBeforeAndAfter_MatchesRotatingTheOppositeWayUnmirrored(float, float, float)

    Declaration
    public void HudElementBasis_MirroringAPointBeforeAndAfter_MatchesRotatingTheOppositeWayUnmirrored(float rotationDegrees, float stretchX, float stretchY)
    Parameters
    Type Name Description
    float rotationDegrees
    float stretchX
    float stretchY

    NormalizeDegrees_FoldsIntoTheHalfOpenRange(float, float)

    Declaration
    public void NormalizeDegrees_FoldsIntoTheHalfOpenRange(float input, float expected)
    Parameters
    Type Name Description
    float input
    float expected

    ResizeThenRotateThenResize_RoundTripsTheScaleAndFollowsThePredictedOffset()

    Declaration
    public void ResizeThenRotateThenResize_RoundTripsTheScaleAndFollowsThePredictedOffset()

    Resize_ClampsAtTheLowerBound_AndKeepsTheFixedPointStill()

    Declaration
    public void Resize_ClampsAtTheLowerBound_AndKeepsTheFixedPointStill()

    Resize_ClampsAtTheUpperBound_AndKeepsTheFixedPointStill()

    Declaration
    public void Resize_ClampsAtTheUpperBound_AndKeepsTheFixedPointStill()

    Resize_DegenerateStartVector_KeepsTheStartingScale()

    Declaration
    public void Resize_DegenerateStartVector_KeepsTheStartingScale()

    Resize_DoublingThePointerDistance_DoublesTheScale()

    Declaration
    public void Resize_DoublingThePointerDistance_DoublesTheScale()

    Resize_IgnoresAnchor_ProducingTheSameResultForEveryAnchor(UiAnchorType)

    Declaration
    public void Resize_IgnoresAnchor_ProducingTheSameResultForEveryAnchor(UiAnchorType anchor)
    Parameters
    Type Name Description
    UiAnchorType anchor

    Resize_OnAStretchedElement_KeepsTheFixedPointStill()

    Declaration
    public void Resize_OnAStretchedElement_KeepsTheFixedPointStill()

    Resize_PerpendicularMotion_ClampsToTheFloorInsteadOfGoingNegative()

    Declaration
    public void Resize_PerpendicularMotion_ClampsToTheFloorInsteadOfGoingNegative()

    Resize_PointerAtTheFixedPoint_ProducesNoNaNOrInfinity()

    Declaration
    public void Resize_PointerAtTheFixedPoint_ProducesNoNaNOrInfinity()

    Resize_SnapsTheScaleToTheStep()

    Declaration
    public void Resize_SnapsTheScaleToTheStep()

    Resize_WithAFixedPointAtTheAnchor_LeavesTheOffsetByteIdentical()

    Declaration
    public void Resize_WithAFixedPointAtTheAnchor_LeavesTheOffsetByteIdentical()

    Resize_WithTheCentreAsTheFixedPoint_KeepsTheCentreStill()

    Declaration
    public void Resize_WithTheCentreAsTheFixedPoint_KeepsTheCentreStill()

    Resize_WithTheOppositeCorner_KeepsThatCornerStill()

    Declaration
    public void Resize_WithTheOppositeCorner_KeepsThatCornerStill()

    Rotate_AboutTheElementsCentre_KeepsTheCentreStill()

    Declaration
    public void Rotate_AboutTheElementsCentre_KeepsTheCentreStill()

    Rotate_ForAMirroredElement_ClockwiseScreenSweepIncreasesTheAuthoredAngle()

    Declaration
    public void Rotate_ForAMirroredElement_ClockwiseScreenSweepIncreasesTheAuthoredAngle()

    Rotate_ForAnUnmirroredElement_ClockwiseScreenSweepDecreasesTheAuthoredAngle()

    Declaration
    public void Rotate_ForAnUnmirroredElement_ClockwiseScreenSweepDecreasesTheAuthoredAngle()

    Rotate_NinetyDegreeCcwScreenSweep_ProducesPlusNinetyAuthored()

    Declaration
    public void Rotate_NinetyDegreeCcwScreenSweep_ProducesPlusNinetyAuthored()

    Rotate_NinetyDegreeCwScreenSweep_ProducesMinusNinetyAuthored()

    Declaration
    public void Rotate_NinetyDegreeCwScreenSweep_ProducesMinusNinetyAuthored()

    Rotate_OnAStretchedElement_KeepsTheCentreStill()

    Declaration
    public void Rotate_OnAStretchedElement_KeepsTheCentreStill()

    Rotate_SnapsToFifteenDegreesInDisplayedSpace()

    Declaration
    public void Rotate_SnapsToFifteenDegreesInDisplayedSpace()

    Rotate_SweepingPastOneEighty_WrapsContinuously()

    Declaration
    public void Rotate_SweepingPastOneEighty_WrapsContinuously()

    Rotate_WithAFixedPointAtTheAnchor_LeavesTheOffsetUntouched()

    Declaration
    public void Rotate_WithAFixedPointAtTheAnchor_LeavesTheOffsetUntouched()

    ScaleRatio_IsInvariantToFlippingBothVectorsVertically()

    Declaration
    public void ScaleRatio_IsInvariantToFlippingBothVectorsVertically()
    In this article
    © 2026 Serenity. All Rights Reserved