public void Clear(Color c) { for (int i = 0; i < Buffer.Count; i++) { Buffer[i] = c; } }
// TODO Pattern class that can be created w/ a lambda and used in place of a color public void Clear(byte R = 0, byte G = 0, byte B = 0, byte A = 255) { for (int i = 0; i < Buffer.Count; i++) { Buffer[i] = new Color(R, G, B, A); } }
public void DrawSegment(int startPixel, Color color, int length) { for (int i = startPixel; i < startPixel + length; i++) { if (i >= Buffer.Count) // TODO: Or should it wrap? return; Buffer[i] = color; } }
public override PixelBuffer Render() { buffer.WholeBufferTransparency = 0; buffer.ZIndex = 0; x += 1; for (int i = 0; i < pixelcount; i++) buffer[i] = new Color((byte)(i + x / 3), (byte)x, (byte)((i + x) / 4)); return buffer; }
public PixelBuffer CompositeBuffers(List<PixelBuffer> buffers) { var pixelCount = buffers.First().Buffer.Count; var resultBuffer = new PixelBuffer(pixelCount); for (int pixel = 0; pixel < pixelCount; pixel++) { Color compositeColor = new Color(0, 0, 0, 0); // TODO: Order buffers by ZIndex for (int i = 0; i < buffers.Count(); i++) { compositeColor.Mix(buffers[i][pixel], buffers[i].WholeBufferTransparency); } resultBuffer[pixel] = compositeColor; } return resultBuffer; }
public FlatColorRenderer(Color c) { this.c = c; }
public override void SetPixel(int pixelNum, Color c) { sim.SetPixel(pixelNum, c); }
public void DrawPoint(int pixel, Color color) { Buffer[pixel] = color; }