Class ShapeDrawer
A utility class to provide math drawing utilities
Properties
Name | Type | Description |
drawColor [set]
|
Color | Sets the color that the ShapeDrawer will draw at
|
drawColor [get]
|
Color | Gets the color that the ShapeDrawer will draw at
|
Methods
Name | Description |
draw
|
Draws a point to the screen
Just calls the basic draw point method
|
draw
|
Draws a point to the screen
|
draw
|
Draws a point given by a vector
|
draw
|
Draws a line given by two points
|
draw
|
Draws a line given by a segment
|
draw
|
Draws the given rectangle
|
draw
|
Draws the given bezier curve with numPoints number of points on the curve
More points is smoother but slower
|
draw
|
Draws a polygon
|
draw
|
Draws the ellipse bounded by the given box between the given angles in radians
More points generally means a slower but more well drawn ellipse
|
drawLine
|
Draws a line
Can be overridden
|
drawPoint
|
Shape drawer needs only one fundamental draw methods to be defined:
point, which all other shape drawer fill and draw methods use
Other methods below can be overridden if there exists more efficient sdl method
|
drawPointRotated
|
Draws a point rotated about the given "pointOfRotation" and rotated clockwise by the the amount of radians specified in "rotation"
|
drawRect
|
Draws the outlines of a rectangle
Can be overridden
|
drawRotated
|
Performs a draw function but rotates each point by the specified rotation given in radians clockwise around the specified point
|
fill
|
Fills the given rectangle
|
fill
|
Fills a polygon
Uses scanlining
|
fill
|
Fills the ellipse bounded by the given box between the given angles in radians
Fills the ellipse between the arc endpoints: fills ellipse as arc rather than filling as ellipse (not a pizza slice)
More points generally means a slower but more well drawn ellipse
|
fillRect
|
Fills in a rectangle
Can be overridden
|