Beispiel #1
0
 public unsafe void SetPixel(int x, int y, ColorEx color)
 {
     fixed(byte *bytebuf = pixelData)
     {
         PixelUtil.PackColor(color.r, color.g, color.b, color.a, format, bytebuf + ComputeOffset(x, y));
     }
 }
Beispiel #2
0
 protected unsafe void Fill(int xfill, int yfill, int w, int h, ColorEx color)
 {
     fixed(byte *bytebuf = pixelData)
     {
         for (int y = yfill; y < (yfill + h); y++)
         {
             for (int x = xfill; x < (xfill + w); x++)
             {
                 PixelUtil.PackColor(color.r, color.g, color.b, color.a, format, bytebuf + ComputeOffset(x, y));
             }
         }
     }
 }