mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
love.graphics.circle/ellipse/arc/rectangle now take transformation scale into account when determining the number of segments to use. Resolves issue #1184.
--HG-- branch : minor
This commit is contained in:
@@ -397,7 +397,8 @@ public:
|
||||
* @param ry The radius of the corners on the y axis
|
||||
* @param points The number of points to use per corner
|
||||
**/
|
||||
void rectangle(DrawMode mode, float x, float y, float w, float h, float rx, float ry, int points = 10);
|
||||
void rectangle(DrawMode mode, float x, float y, float w, float h, float rx, float ry, int points);
|
||||
void rectangle(DrawMode mode, float x, float y, float w, float h, float rx, float ry);
|
||||
|
||||
/**
|
||||
* Draws a circle using the specified arguments.
|
||||
@@ -407,7 +408,8 @@ public:
|
||||
* @param radius Radius of the circle.
|
||||
* @param points Number of points to use to draw the circle.
|
||||
**/
|
||||
void circle(DrawMode mode, float x, float y, float radius, int points = 10);
|
||||
void circle(DrawMode mode, float x, float y, float radius, int points);
|
||||
void circle(DrawMode mode, float x, float y, float radius);
|
||||
|
||||
/**
|
||||
* Draws an ellipse using the specified arguments.
|
||||
@@ -418,7 +420,8 @@ public:
|
||||
* @param b Radius in y-direction
|
||||
* @param points Number of points to use to draw the circle.
|
||||
**/
|
||||
void ellipse(DrawMode mode, float x, float y, float a, float b, int points = 10);
|
||||
void ellipse(DrawMode mode, float x, float y, float a, float b, int points);
|
||||
void ellipse(DrawMode mode, float x, float y, float a, float b);
|
||||
|
||||
/**
|
||||
* Draws an arc using the specified arguments.
|
||||
@@ -431,7 +434,8 @@ public:
|
||||
* @param angle2 The angle at which the arc terminates.
|
||||
* @param points Number of points to use to draw the arc.
|
||||
**/
|
||||
void arc(DrawMode drawmode, ArcMode arcmode, float x, float y, float radius, float angle1, float angle2, int points = 10);
|
||||
void arc(DrawMode drawmode, ArcMode arcmode, float x, float y, float radius, float angle1, float angle2, int points);
|
||||
void arc(DrawMode drawmode, ArcMode arcmode, float x, float y, float radius, float angle1, float angle2);
|
||||
|
||||
/**
|
||||
* Draws a polygon with an arbitrary number of vertices.
|
||||
@@ -522,6 +526,8 @@ private:
|
||||
|
||||
void checkSetDefaultFont();
|
||||
|
||||
int calculateEllipsePoints(float rx, float ry) const;
|
||||
|
||||
StrongRef<love::window::Window> currentWindow;
|
||||
|
||||
StrongRef<Font> defaultFont;
|
||||
|
||||
Reference in New Issue
Block a user