public void RenderDrawsDeathMagenta() { IRenderImage src = new BufferImage(16, 16, CreatePixels(16, 16, MAGENTA)); IRenderImage dest = RenderImage.Create(16, 16); Render.render(dest, 0, 0, src, true); Assert.AreEqual(dest.GetArray(), src.GetArray()); }
public void CreateBufferImageFromArray() { BufferImage img = new BufferImage(16, 16, CreatePixels(16, 16, GREEN)); Assert.AreEqual(16, img.Width); Assert.AreEqual(16, img.Height); Assert.AreEqual(CreatePixels(16, 16, GREEN), img.GetArray()); }
public void Clone() { BufferImage img = new BufferImage(16, 16); img.UpdatePixels(CreateStippledPixels(16, 16, WHITE, GREEN)); IRenderImage i2 = img.Clone(); Assert.AreEqual(i2.GetArray(), img.GetArray()); }