public void Draw(DrawableBytes drawableBytes) { for (var x = (int)Position.X; x < (int)Position.X + (int)Size.X; x++) { for (var y = (int)Position.Y; y < (int)Position.Y + (int)Size.Y; y++) { drawableBytes.SetPixelIfContains(x, y, Color); } } }
public static BitmapSource ToBitmapSource(this DrawableBytes drawableBytes) { return(drawableBytes.Bytes.ToBitmapSource(drawableBytes.Width, drawableBytes.Height, drawableBytes.ColorComponentsCount)); }
public void Init(int widht, int height) => DrawableBytes = new DrawableBytes(widht, height, 24);