MaterialTests LoadSavedMaterialWithClearPadding 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 LoadSavedMaterialWithClearPadding()
Examples

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