Method DrawLine
DrawLine(Vector2, Vector2, Color, float, Texture)
Draw's a texture between two locations of a passed in width.
Declaration
public static void DrawLine(Vector2 p1, Vector2 p2, Color color, float width = 3, Texture texture = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | p1 | The start point in pixel space |
| Vector2 | p2 | The end point in pixel space |
| Color | color | The color of the line |
| float | width | The width of the line |
| Texture | texture | The texture to use, if null, will draw a solid line of passed in color |
DrawLine(float, float, float, float, Color, float, Texture)
Draw's a texture between two locations of a passed in width.
Declaration
public static void DrawLine(float p1X, float p1Y, float p2X, float p2Y, Color color, float width = 3, Texture texture = null)
Parameters
| Type | Name | Description |
|---|---|---|
| float | p1X | The start point's x coordinate in pixel space |
| float | p1Y | The start point's y coordinate in pixel space |
| float | p2X | The end point's x coordinate in pixel space |
| float | p2Y | The end point's y coordinate in pixel space |
| Color | color | The color of the line |
| float | width | The width of the line |
| Texture | texture | The texture to use, if null, will draw a solid line of passed in color |