On 2013-08-10 17:07+1000 Joost Kuckartz wrote:
> [I wrote]
>> Getting back to the eofill topic, >
>> If you stick strictly to backend=0 what happens when you
>> run example 27 with and without the -eofill option?  Do you get
>> the same results for the two cases or very different results?
>
> In my case, I get clearly different results, and you're right, my wxWidgets 
> returns always to basic, even if I specify backend=2. Thus I have no problems 
> with the DC backend.
>
>> For Linux, it appears the backend=0=wxBACKEND_DC case only uses the
>> even-odd fill rule regardless of whether -eofill is used or not, i.e.
>> regardless of whether we call
>>
>> DrawPolygon( pls->dev_npts, points, xoffset, yoffset, wxODDEVEN_RULE )
>> or
>> DrawPolygon( pls->dev_npts, points, xoffset, yoffset, wxWINDING_RULE )
>>
>> I am pretty sure that is due to a bug in the implementation of the
>> wxwidgets software package (or at least the Debian wheezy binary
>> package for it).
>

> That's interesting, because in my case it just works! Maybe it's the
newer version of wxWidgets that causes this to do so? Or the Linux
device driver within wxWidgets (because wxDC has OS dependent
implementation I think)?

For your information the Debian wheezy version of the wxwidgets
software package that shows this filling rule bug is 2.8.12.1-12, and
the version that I (sometimes) build (but I haven't yet looked in
detail at example 27 for that case) is also 2.8.12.

I also believe I discovered the source of the non-propagation
of the filling rule for the Linux case where the
filling is done by the X library.  In the 2.8.12 source code
for the wxwidgets software, I tracked DrawPolygon to DoDrawPolygon
which is implemented for the X11 case (I am pretty sure from the name)

src/x11/dcclient.cpp.

There you will notice that fillStyle is completely ignored inside

void wxWindowDC::DoDrawPolygon( int n, wxPoint points[],
                                 wxCoord xoffset, wxCoord yoffset, int
fillStyle )

So regardless of the fillStyle it uses the X default filling rule
which from http://tronche.com/gui/x/xlib/GC/manipulating.html appears
to be odd-even (which is what I observe on Linux). Of course, filling
is not done by X on Windows so you won't use src/x11/dcclient.cpp and
you therefore don't see the bug that I observe on Linux.

I have decided not to report this wxwidgets-2.8.12 bug since that
version is pretty old (although its the latest stable release), and
the first thing the wxwidgets developers will ask me is to try their
latest development release (2.9.5), and I don't want to get further
involved with testing that at this stage.  But at least we now know
the reason why on Linux I am always getting the odd-even fill rule
with DrawPolygon regardless of whether wxODDEVEN_RULE or
wxWINDING_RULE is specified as the last argument.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to