mirror of
https://github.com/love2d/love.git
synced 2026-08-12 00:20:52 +02:00
Change default segments for l.g.circle to max(10, r)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user