Add eclipse and roundedRectangle to love.graphics

This commit is contained in:
muddmaker
2015-05-23 12:52:27 -07:00
parent c3fd7a25a3
commit fbc419fda6
4 changed files with 148 additions and 0 deletions
+23
View File
@@ -377,6 +377,17 @@ public:
**/
void circle(DrawMode mode, float x, float y, float radius, int points = 10);
/**
* Draws an eclipse using the specified arguments.
* @param mode The mode of drawing (line/filled).
* @param x X-coordinate of center
* @param y Y-coordinate of center
* @param a Radius in x-direction
* @param b Radius in y-direction
* @param points Number of points to use to draw the circle.
**/
void eclipse(DrawMode mode, float x, float y, float a, float b, int points = 10);
/**
* Draws an arc using the specified arguments.
* @param mode The mode of drawing (line/filled).
@@ -389,6 +400,18 @@ public:
**/
void arc(DrawMode mode, float x, float y, float radius, float angle1, float angle2, int points = 10);
/**
* Draws a rounded rectangle.
* @param mode The mode of drawing (line/filled).
* @param x X-coordinate of top-left corner
* @param y Y-coordinate of top-left corner
* @param w The width of the rectangle.
* @param h The height of the rectangle.
* @param r The radius of the corners.
* @param points The number of points to use per corner
**/
void roundedRectangle(DrawMode mode, float x, float y, float w, float h, float r, float points = 10);
/**
* Draws a polygon with an arbitrary number of vertices.
* @param mode The type of drawing (line/filled).