Re: [fltk.bugs] Bug in fl_pie() ?

2011-03-16 Thread Janus
Oh! Thank you Albert, will do if i can find something really bad! :)
___
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs


Re: [fltk.bugs] Bug in fl_pie() ?

2011-03-15 Thread Albrecht Schlosser
On 14.03.2011 07:46, Janus wrote:

> in v1.1.10 when i do draw
> fl_pie(ox, oy + 4, side, side - 12, 300, 240);
> on a linux box it wouldn't draw. it would draw on a mac. if i change the line 
> to
> fl_pie(ox, oy + 4, side, side - 12, 0, 360);
> it draws on both systems.
> i couldn't find any os specific issues about fl_pie() in the docs so i 
> thought i let you know. thanks.

There shouldn't be any difference, but your code is not correct,
and hence the behavior is /undefined/. See the docs at

http://www.fltk.org/doc-1.1/drawing.html#fl_pie

"The two angles are measured in degrees counterclockwise from
  3'oclock and are the starting and ending angle of the arc,
  a2 must be greater or equal to a1."
  ^

Please replace 300 with -60 and try again, this ought to work as
expected.

BTW: There's a test case in test/unittests (unittest_circles.cxx)
and I used this to test your case. I changed the fl_pie call in
line #77 from:

   fl_pie(a+65, b+55, 31, 31, -30.0, 120.0);
to
   fl_pie(a+65, b+55, 31, 31, 330.0, 120.0);

On Linux (Ubuntu), this draws the opposite part of the pie, whereas
on Windows it doesn't change the behavior. But I can't say that it
"wouldn't draw" on Linux. That's what undefined behavior means...

BTW.: Please don't post directly to fltk.bugs, this is reserved for
FLTK's automatic bug tracking system. You should either file a bug
report at http://www.fltk.org/str.php or ask in fltk.general first
whether this is a bug or not (as you did here). Thanks.

Albrecht
___
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs


[fltk.bugs] Bug in fl_pie() ?

2011-03-13 Thread Janus
greetings,

in v1.1.10 when i do draw
fl_pie(ox, oy + 4, side, side - 12, 300, 240);
on a linux box it wouldn't draw. it would draw on a mac. if i change the line to
fl_pie(ox, oy + 4, side, side - 12, 0, 360);
it draws on both systems.
i couldn't find any os specific issues about fl_pie() in the docs so i thought 
i let you know. thanks.
___
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs