SpriteTests CreateSprite Method Delta Engine Documentation

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

public void CreateSprite()
Examples

[Test, CloseAfterFirstFrame]
public void CreateSprite()
{
    var sprite = new Sprite(logoMaterial, Rectangle.HalfCentered);
    Assert.AreEqual(Color.White, sprite.Color);
    Assert.AreEqual("DeltaEngineLogoAlpha", sprite.Material.DiffuseMap.Name);
    Assert.IsTrue(sprite.Material.DiffuseMap.PixelSize == DiskContentSize ||
        sprite.Material.DiffuseMap.PixelSize == MockContentSize);
}
See Also