On 20.08.2011, at 22:55, Richard Sanders wrote:

> There seems to be an out by one error in drawing coordinate between
> win32 and X11/
> 
> Here is an example
> 
> static void DrawRod(int x, int y, int d)
> {
>  int r = d >> 1;
>  fl_color(FL_RED);
> #ifdef WIN32
>  fl_pie(x, y, d, d, 0, 360);
> #else
>  fl_pie(x, y, d + 1, d + 1, 0, 360);
> #endif
>  fl_color(FL_BLACK);
>  fl_circle(x + r, y + r, r);
> }

The WIN32 API uses different coordinates than the OS X and X11 API. Especially 
with round drawings that should use floating point coordinates, the those 
errors become visible. FLTK tries its best to make fl_... graphics calls look 
the same on all platforms, but that is not always possible.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to