Added a new variant of love.graphics.arc: arc(drawmode, arcmode, x, y, radius, angle1, angle2 [, points]).

arcmode is "open", "closed", or "pie" (with pie being the mode used for the original variant of the function).
This commit is contained in:
Alex Szpakowski
2015-12-31 00:13:01 -04:00
parent 2cadb30ecf
commit a42341aa73
5 changed files with 125 additions and 31 deletions
+14
View File
@@ -70,6 +70,14 @@ public:
DRAW_MAX_ENUM
};
enum ArcMode
{
ARC_OPEN,
ARC_CLOSED,
ARC_PIE,
ARC_MAX_ENUM
};
enum BlendMode
{
BLEND_ALPHA,
@@ -259,6 +267,9 @@ public:
static bool getConstant(const char *in, DrawMode &out);
static bool getConstant(DrawMode in, const char *&out);
static bool getConstant(const char *in, ArcMode &out);
static bool getConstant(ArcMode in, const char *&out);
static bool getConstant(const char *in, BlendMode &out);
static bool getConstant(BlendMode in, const char *&out);
@@ -294,6 +305,9 @@ private:
static StringMap<DrawMode, DRAW_MAX_ENUM>::Entry drawModeEntries[];
static StringMap<DrawMode, DRAW_MAX_ENUM> drawModes;
static StringMap<ArcMode, ARC_MAX_ENUM>::Entry arcModeEntries[];
static StringMap<ArcMode, ARC_MAX_ENUM> arcModes;
static StringMap<BlendMode, BLEND_MAX_ENUM>::Entry blendModeEntries[];
static StringMap<BlendMode, BLEND_MAX_ENUM> blendModes;