Class Shapes
A class to define how different shapes are drawn.
public static class Shapes
- Inheritance
-
Shapes
- Inherited Members
Methods
Circle(int, int, IntVector2, IntVector2, Color, bool, bool)
public static Texture2D Circle(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled, bool stayWithinImageBounds)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2colour
Colorfilled
boolstayWithinImageBounds
bool
Returns
- Texture2D
Diamond(int, int, IntVector2, IntVector2, Color, bool)
public static Texture2D Diamond(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2colour
Colorfilled
bool
Returns
- Texture2D
Ellipse(int, int, IntVector2, IntVector2, Color, bool)
public static Texture2D Ellipse(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2colour
Colorfilled
bool
Returns
- Texture2D
Gradient(int, int, IntVector2, IntVector2, Color, Color, GradientMode)
public static Texture2D Gradient(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color startColour, Color endColour, GradientMode gradientMode)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2startColour
ColorendColour
ColorgradientMode
GradientMode
Returns
- Texture2D
GradientLinear(int, int, IntVector2, IntVector2, Color, Color)
public static Texture2D GradientLinear(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color startColour, Color endColour)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2startColour
ColorendColour
Color
Returns
- Texture2D
GradientRadial(int, int, IntVector2, IntVector2, Color, Color)
public static Texture2D GradientRadial(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color startColour, Color endColour)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2startColour
ColorendColour
Color
Returns
- Texture2D
IsoBox(int, int, IntVector2, IntVector2, IntVector2, Color, bool)
public static Texture2D IsoBox(int texWidth, int texHeight, IntVector2 baseStart, IntVector2 baseEnd, IntVector2 heightEnd, Color colour, bool filled)
Parameters
texWidth
inttexHeight
intbaseStart
IntVector2baseEnd
IntVector2heightEnd
IntVector2colour
Colorfilled
bool
Returns
- Texture2D
IsoRectangle(int, int, IntVector2, IntVector2, Color, bool)
public static Texture2D IsoRectangle(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2colour
Colorfilled
bool
Returns
- Texture2D
Line(int, int, IntVector2, IntVector2, Color)
public static Texture2D Line(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2colour
Color
Returns
- Texture2D
LineCoords(IntVector2, IntVector2)
Gets the coords of a pixel-perfect line between two points, ordered from start to end.
public static IntVector2[] LineCoords(IntVector2 start, IntVector2 end)
Parameters
start
IntVector2end
IntVector2
Returns
Rectangle(int, int, IntVector2, IntVector2, Color, bool)
public static Texture2D Rectangle(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2colour
Colorfilled
bool
Returns
- Texture2D
RightTriangle(int, int, IntVector2, IntVector2, Color, bool, bool)
public static Texture2D RightTriangle(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool rightAngleOnBottom, bool filled)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2colour
ColorrightAngleOnBottom
boolfilled
bool
Returns
- Texture2D
SnapEndCoordToSquare(IntVector2, IntVector2)
Snaps the end coord so that the rect it forms with the start coord is a square.
public static IntVector2 SnapEndCoordToSquare(IntVector2 start, IntVector2 end)
Parameters
start
IntVector2end
IntVector2
Returns
SnapEndCoordToSquare(int, int, IntVector2, IntVector2, bool)
Snaps the end coord so that the rect it forms with the start coord is a square.
public static IntVector2 SnapEndCoordToSquare(int texWidth, int texHeight, IntVector2 start, IntVector2 end, bool stayWithinImageBounds)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2stayWithinImageBounds
bool
Returns
Square(int, int, IntVector2, IntVector2, Color, bool, bool)
public static Texture2D Square(int texWidth, int texHeight, IntVector2 start, IntVector2 end, Color colour, bool filled, bool stayWithinImageBounds)
Parameters
texWidth
inttexHeight
intstart
IntVector2end
IntVector2colour
Colorfilled
boolstayWithinImageBounds
bool
Returns
- Texture2D