Exemplo n.º 1
0
 /// <summary>
 /// Draws a filled circle on pixels using Bresenham's algorithm
 /// </summary>
 public static void DrawFilledCircle(this Color[] pixels, int textureWidth, int centerX, int centerY, int radius, Color color)
 {
     if (pixels == null)
     {
         throw new ArgumentNullException(nameof(pixels));
     }
     Draw.RasterFilledCircle(centerX, centerY, radius, (x, y) => pixels[x + y * textureWidth] = color);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Draws filled circle on texture using Bresenham's algorithm
 /// </summary>
 public static void DrawFilledCircle(this Texture2D texture, int centerX, int centerY, int radius, Color color)
 {
     if (texture == null)
     {
         throw new ArgumentNullException("texture");
     }
     Draw.RasterFilledCircle(centerX, centerY, radius, (x, y) => texture.SetPixel(x, y, color));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Draws filled circle on texture using Bresenham's algorithm
 /// </summary>
 public static void DrawFilledCircle(this Texture2D texture, int centerX, int centerY, int radius, Color color)
 {
     Draw.RasterFilledCircle(centerX, centerY, radius, (x, y) => texture.SetPixel(x, y, color));
 }