Class TextureDataDrawingExtensions
Inheritance
Inherited Members
Namespace: InsaneScatterbrain.MapGraph
Syntax
public static class TextureDataDrawingExtensions
Methods
DrawArea(TextureData, Area, Color32)
Draws area onto the texture using the given color.
Declaration
public static void DrawArea(this TextureData texture, Area area, Color32 color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | The texture. |
Area | area | The area to draw. |
UnityEngine.Color32 | color | The color to draw the areas with. |
DrawAreas(TextureData, IEnumerable<Area>, Color32)
Draws areas onto the texture using the given color.
Declaration
public static void DrawAreas(this TextureData texture, IEnumerable<Area> areas, Color32 color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | The texture. |
System.Collections.Generic.IEnumerable<T><Area> | areas | The areas to draw. |
UnityEngine.Color32 | color | The color to draw the areas with. |
DrawCircles(TextureData, IEnumerable<Vector2Int>, int, Color32, List<Vector2Int>)
Declaration
public static void DrawCircles(this TextureData texture, IEnumerable<Vector2Int> centerPoints, int radius, Color32 color, List<Vector2Int> relativePoints)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | |
System.Collections.Generic.IEnumerable<T><UnityEngine.Vector2Int> | centerPoints | |
int | radius | |
UnityEngine.Color32 | color | |
System.Collections.Generic.List<T><UnityEngine.Vector2Int> | relativePoints |
DrawCircles(TextureData, IEnumerable<Vector2Int>, int, Color32)
Declaration
[Obsolete("This overload will likely be removed in version 2.0.")]
public static void DrawCircles(this TextureData texture, IEnumerable<Vector2Int> centerPoints, int radius, Color32 color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | |
System.Collections.Generic.IEnumerable<T><UnityEngine.Vector2Int> | centerPoints | |
int | radius | |
UnityEngine.Color32 | color |
DrawLine(TextureData, Vector2Int, Vector2Int, Color, int)
Draws a line onto the texture of the given color and thickness between a start and end point.
Declaration
public static void DrawLine(this TextureData texture, Vector2Int p0, Vector2Int p1, Color color, int thickness)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | The texture data. |
UnityEngine.Vector2Int | p0 | First of the two points to draw a line between. |
UnityEngine.Vector2Int | p1 | Second of the two points to draw a line between. |
UnityEngine.Color | color | The line color. |
int | thickness | The line thickness. |
DrawLine(TextureData, Vector2Int, Vector2Int, Color)
Draws a line onto the texture of the given color between a start and end point.
Declaration
public static void DrawLine(this TextureData texture, Vector2Int p0, Vector2Int p1, Color color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | The texture data. |
UnityEngine.Vector2Int | p0 | First of the two points to draw a line between. |
UnityEngine.Vector2Int | p1 | Second of the two points to draw a line between. |
UnityEngine.Color | color | The line color. |
DrawLines(TextureData, Color, params Vector2Int[])
Draws a line onto the texture of the given color between an array of points. Points[0] is connected to Points[1], Points[1] to Points[2], etc.
Declaration
public static void DrawLines(this TextureData texture, Color color, params Vector2Int[] points)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | The texture data. |
UnityEngine.Color | color | The line color. |
UnityEngine.Vector2Int[] | points | The points to draw lines between. |
DrawRect(TextureData, RectInt, Color)
Declaration
public static void DrawRect(this TextureData texture, RectInt rect, Color color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | |
UnityEngine.RectInt | rect | |
UnityEngine.Color | color |
DrawRect(TextureData, Vector2Int, int, int, float, Color)
Draws unfilled rectangle of given color, based on the first corner point, the given width, height and rotation.
Declaration
public static void DrawRect(this TextureData texture, Vector2Int p0, int width, int height, float angle, Color color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | The texture. |
UnityEngine.Vector2Int | p0 | The first corner point. |
int | width | The width. |
int | height | The height. |
float | angle | The angle. |
UnityEngine.Color | color | The draw color. |
DrawRectFill(TextureData, RectInt, Color)
Declaration
public static void DrawRectFill(this TextureData texture, RectInt rect, Color color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | |
UnityEngine.RectInt | rect | |
UnityEngine.Color | color |
DrawRectFill(TextureData, Vector2Int, int, int, float, Color)
Draws filled rectangle of given color, based on the first corner point, the given width, height and rotation.
Declaration
public static void DrawRectFill(this TextureData texture, Vector2Int p0, int width, int height, float angle, Color color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | The texture data. |
UnityEngine.Vector2Int | p0 | The first corner point. |
int | width | The width. |
int | height | The height. |
float | angle | The angle. |
UnityEngine.Color | color | The draw color. |
DrawRects(TextureData, IEnumerable<RectInt>, Color)
Declaration
public static void DrawRects(this TextureData texture, IEnumerable<RectInt> rects, Color color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | |
System.Collections.Generic.IEnumerable<T><UnityEngine.RectInt> | rects | |
UnityEngine.Color | color |
DrawRectsFill(TextureData, IEnumerable<RectInt>, Color)
Declaration
public static void DrawRectsFill(this TextureData texture, IEnumerable<RectInt> rects, Color color)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | |
System.Collections.Generic.IEnumerable<T><UnityEngine.RectInt> | rects | |
UnityEngine.Color | color |
Fill(TextureData, Color32)
Declaration
public static void Fill(this TextureData texture, Color32 fillColor)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | |
UnityEngine.Color32 | fillColor |
FillPoints(TextureData, IEnumerable<Vector2Int>, Color32)
Declaration
public static void FillPoints(this TextureData texture, IEnumerable<Vector2Int> points, Color32 fillColor)
Parameters
Type | Name | Description |
---|---|---|
TextureData | texture | |
System.Collections.Generic.IEnumerable<T><UnityEngine.Vector2Int> | points | |
UnityEngine.Color32 | fillColor |