Lua: Fixed drawdisk which was drawing a square instead of a circle (doh!). Radius can now be a multiple of 0.5 to draw circles of even sizes (r=0 -> 1x1, r=0.5 -> 2x2, r=1 -> 3x3 etc.)

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1798 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2011-06-14 21:52:20 +00:00
parent 2f3e1e3294
commit bf28d19f20
4 changed files with 36 additions and 21 deletions

View File

@@ -37,21 +37,6 @@
//---------------------- Modifier le pinceau spécial -------------------------
int Circle_squared_diameter(int diameter)
{
int result = diameter*diameter;
// Trick to make some circles rounder, even though
// mathematically incorrect.
if (diameter==3 || diameter==9)
return result-2;
if (diameter==11)
return result-6;
if (diameter==14)
return result-4;
return result;
}
void Set_paintbrush_size(int width, int height)
{
int x_pos,y_pos;