MaterialTests LoadSavedMaterialWithRotation Method Delta Engine Documentation

Namespace: DeltaEngine.Graphics.Tests
Assembly: DeltaEngine.Graphics.Tests (in DeltaEngine.Graphics.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void LoadSavedMaterialWithRotation()
Examples

[Test, CloseAfterFirstFrame]
public void LoadSavedMaterialWithRotation()
{
    var loadedMaterial = ContentLoader.Load<Material>("DefaultMaterial");
    loadedMaterial.RenderingCalculator = new RenderingCalculator(new AtlasRegion
    {
        PadLeft = 0.5f,
        PadRight = 0.5f,
        PadTop = 0.5f,
        PadBottom = 0.5f,
        IsRotated = true
    });
    var result = loadedMaterial.RenderingCalculator.GetUVAndDrawArea(Rectangle.HalfCentered,
        Rectangle.One);
    Assert.AreEqual(result.RequestedUserUV, Rectangle.HalfCentered);
}
See Also