Пример #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);
 }
Пример #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));
 }
Пример #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));
 }