Change default segments for l.g.circle to max(10, r)

This commit is contained in:
Bart van Strien
2011-08-31 12:13:06 +02:00
parent 7ab910f281
commit cc7b6431eb
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -54,6 +54,7 @@ LOVE 0.8.0 [Rubber Piggy]
* Updated font engine.
* Updated line drawing to a custom system.
* Updated love.timer.sleep to use seconds, like the rest of love.
* Updated love.graphics.circle to have max(10, r) as default for segments.
* Removed canvas auto-clearing.
* Removed EncodedImageData.
@@ -995,7 +995,11 @@ namespace opengl
float x = (float)luaL_checknumber(L, 2);
float y = (float)luaL_checknumber(L, 3);
float radius = (float)luaL_checknumber(L, 4);
int points = luaL_optint(L, 5, 10);
int points;
if (lua_gettop(L) > 4)
points = lua_tointeger(L, 5);
else
points = radius > 10 ? radius : 10;
instance->circle(mode, x, y, radius, points);
return 0;
}