ImageTests CreatingTwoImagesWithTheSameDataAlwaysResultsInDifferentImages 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 CreatingTwoImagesWithTheSameDataAlwaysResultsInDifferentImages()
Examples

[Test, CloseAfterFirstFrame]
public void CreatingTwoImagesWithTheSameDataAlwaysResultsInDifferentImages()
{
    var data1 = new ImageCreationData(new Size(4, 4));
    var data2 = new ImageCreationData(new Size(4, 4));
    Assert.AreNotEqual(data1, data2);
    var image1 = ContentLoader.Create<Image>(data1);
    var image2 = ContentLoader.Create<Image>(data2);
    Assert.AreEqual(image1.PixelSize, image2.PixelSize);
    Assert.AreEqual(image1.BlendMode, image2.BlendMode);
    Assert.AreNotEqual(image1, image2);
}
See Also