SpineSkeleton Origin Property Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Spine
Assembly: DeltaEngine.Rendering2D.Spine (in DeltaEngine.Rendering2D.Spine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public Vector2D Origin { get; set; }

Property Value

Type: Vector2D
Remarks

Tests: DeltaEngine.Rendering2D.Spine.Tests.SpineSkeletonTests
Examples

4 unit tests call DeltaEngine.Rendering2D.Spine.SpineSkeleton.Origin
[Test, CloseAfterFirstFrame]
public void SetOrigin()
{
    Assert.AreEqual(Origin, spineboy.Origin);
    spineboy.Origin = Vector2D.UnitX;
    Assert.AreEqual(Vector2D.UnitX, spineboy.Origin);
    Assert.AreEqual(Scale, spineboy.Scale);
}
[Test, CloseAfterFirstFrame]
public void SetScale()
{
    Assert.AreEqual(Scale, spineboy.Scale);
    spineboy.Scale = Size.Half;
    Assert.AreEqual(Origin, spineboy.Origin);
    Assert.AreEqual(Size.Half, spineboy.Scale);
}
[Test, CloseAfterFirstFrame]
public void SetOriginAndScale()
{
    Assert.AreEqual(OriginAndScale, spineboy.OriginAndScale);
    spineboy.OriginAndScale = Rectangle.HalfCentered;
    Assert.AreEqual(Rectangle.HalfCentered, spineboy.OriginAndScale);
}
See Also