/// <summary> /// Draws circle on texture /// </summary> public static void DrawCircle(this Texture2D texture, int centerX, int centerY, int radius, Color color) { if (texture == null) { throw new ArgumentNullException("texture"); } Draw.RasterCircle(centerX, centerY, radius, (x, y) => texture.SetPixel(x, y, color)); }
/// <summary> /// Draws a circle on pixels /// </summary> public static void DrawCircle(this Color[] pixels, int textureWidth, int centerX, int centerY, int radius, Color color) { if (pixels == null) { throw new ArgumentNullException(nameof(pixels)); } Draw.RasterCircle(centerX, centerY, radius, (x, y) => pixels[x + y * textureWidth] = color); }
/// <summary> /// Draws a circle on pixels /// </summary> public static void DrawCircle(this Color[] pixels, int textureWidth, Vector2Int center, int radius, Color color) { if (pixels == null) { throw new ArgumentNullException("pixels"); } Draw.RasterCircle(center, radius, (x, y) => pixels[x + y * textureWidth] = color); }
/// <summary> /// Draws a circle on the texture /// </summary> public static void DrawCircle(this Texture2D texture, Vector2Int center, int radius, Color color) { if (texture == null) { throw new ArgumentNullException(nameof(texture)); } Draw.RasterCircle(center, radius, (x, y) => texture.SetPixel(x, y, color)); }
/// <summary> /// Draws circle on texture /// </summary> public static void DrawCircle(this Texture2D texture, int centerX, int centerY, int radius, Color color) { Draw.RasterCircle(centerX, centerY, radius, (x, y) => texture.SetPixel(x, y, color)); }