On 2013-08-09 15:59+1000 Joost Kuckartz wrote: > I found the error for the wxWidgets device offset! It is indeed a PLplot bug, > deep inside wxwidgets_dc.cpp. > The following will fix it. > > inside the function > void wxPLDevDC::FillPolygon( PLStream *pls ) > > modify the following: > m_dc->DrawPolygon( pls->dev_npts, points, wxODDEVEN_RULE ); > m_dc->DrawPolygon( pls->dev_npts, points, wxWINDING_RULE ); > needs to become > m_dc->DrawPolygon( pls->dev_npts, points, 0,0, wxODDEVEN_RULE ); > m_dc->DrawPolygon( pls->dev_npts, points, 0,0, wxWINDING_RULE ); > > because the documentation says: > void DrawPolygon(int n, wxPoint points[], > wxCoord xoffset = 0, wxCoord yoffset = 0, int > fill_style = wxODDEVEN_RULE) > > So because it was using wxWINDING_RULE in my case, which evaluates to 2, it > had a 2 pixel x offset! > > Hope you can modify this file to support the fix.
Hi Joost: Fixed as of revision 12475. Thanks very much for spotting this. One peculiar issue remains. (For background see http://en.wikipedia.org/wiki/Even–odd_rule and http://en.wikipedia.org/wiki/Nonzero-rule.) software@raven> examples/c/x27c -dev wxwidgets -eofill -drvopt backend=0 uses the even-odd filling rule as expected. But if I drop the -eofill option, that example still shows the even-odd filling rule is being used for the basic wxwidgets backend rather than the correct nonzero fill rule. In contrast, software@raven> examples/c/x27c -dev wxwidgets -eofill -drvopt backend=2 software@raven> examples/c/x27c -dev wxwidgets -drvopt backend=2 shows the very different even-odd fill versus nonzero fill results (as expected) for the wxGC wxwidgets backend. Does the even-odd fill rule work properly for you with the basic wxwidgets backend or do you also confirm that the even-odd fill rule is being used for the basic backend regardless? 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
