Ejemplo n.º 1
0
 /// <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));
 }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 /// <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);
 }
Ejemplo n.º 4
0
 /// <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));
 }
Ejemplo n.º 5
0
 /// <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));
 }