Beispiel #1
0
 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);
         }
     }
 }
Beispiel #2
0
 public static BitmapSource ToBitmapSource(this DrawableBytes drawableBytes)
 {
     return(drawableBytes.Bytes.ToBitmapSource(drawableBytes.Width, drawableBytes.Height, drawableBytes.ColorComponentsCount));
 }
Beispiel #3
0
 public void Init(int widht, int height) => DrawableBytes = new DrawableBytes(widht, height, 24);