/// <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); }
/// <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)); }
/// <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)); }