Matthias Melcher schrieb:
>
> On 21.06.2011, at 15:10, Edzard Egberts wrote: First of all, is this
> 1.1.3 or 1.3.0 ? 1.1.3 is really old, but I think we said that before
> ;-)

Ups, same error twice, I'm getting old! :o(
Yes, it's 1.3.0.

> Secondly, did you set the line style anywhere els in you app? FLTK
> does not reset the line style anywhere before drawing widgets or
> boxes. You must reset the linestyle to the default (0, IIRC), before
> you draw() method returns, or the line style will continue throughout
> the user interface.

You are right, I'm using linestyle somewhere else and at once was 
thinking of a linestyle problem, because I was dealing with this problem 
before. But I also took care to the docs and before leaving the draw() 
I'm using
        fl_line_style(0);       // Reset to default

> Which version of MSWindows is this?

The last known as working - WinXP. ;o)

> Maybe there is some bad antialiasing going on?

No, I just got it:

void Fl_Spectrum::draw()
{
Fl_Box::draw();                                                                 
fl_color(FL_BLACK);
fl_line_style(FL_SOLID, 2);
 >> fl_line_style(0);   // Reset to default
fl_color(FL_GRAY);
fl_line_style(FL_SOLID, 2);
fl_line_style(0);       // Reset to default
}

This is the sequence to cause the problem. Setting linestyle only once 
or without changing colour works as expected. Thinking about it, I 
inserted fl_line_style(0) also twice (>> ) and got rid of the problem.
Seems to me, that fl_line_style is pushing a style and needs a pop.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to