|
From: <ai...@us...> - 2011-02-25 22:36:45
|
Revision: 11579
http://plplot.svn.sourceforge.net/plplot/?rev=11579&view=rev
Author: airwin
Date: 2011-02-25 22:36:39 +0000 (Fri, 25 Feb 2011)
Log Message:
-----------
Replace drawConvexPolygon with drawPolygon. This fixes a -dev qtwidget
bug for example 27 which has complex (i.e., not convex) boundaries for
the filled polygons that are plotted.
Use Qt::WindingFill fill rule rather than the (default)
Qt::OddEvenFill fill rule. This makes a major difference for the
example 27 fill results. For some reason the former is implemented in
the Qt4 library in a much less buggy way than the latter.
N.B. the Qt::WindingFill fill rule is ignored by the svgqt device.
Instead, the resulting svg file has the incorrect oddeven fill
attribute. This must be a bug in the Qt4 library implementation (at
least for the 4.6.3 Debian squeeze version of Qt4).
Modified Paths:
--------------
trunk/bindings/qt_gui/plqt.cpp
Modified: trunk/bindings/qt_gui/plqt.cpp
===================================================================
--- trunk/bindings/qt_gui/plqt.cpp 2011-02-25 12:00:57 UTC (rev 11578)
+++ trunk/bindings/qt_gui/plqt.cpp 2011-02-25 22:36:39 UTC (rev 11579)
@@ -127,7 +127,7 @@
polygon[i].setX( (PLFLT) x[i] * downscale );
polygon[i].setY( m_dHeight - (PLFLT) y[i] * downscale );
}
- m_painterP->drawPolygon( polygon, npts );
+ m_painterP->drawPolygon( polygon, npts, Qt::WindingFill );
delete[] polygon;
}
@@ -1295,7 +1295,7 @@
p->setPen( NoPen );
hasPen = false;
}
- p->drawConvexPolygon( *( i->Data.Polyline ) );
+ p->drawPolygon( *( i->Data.Polyline ), Qt::WindingFill );
p->setRenderHints( QPainter::Antialiasing, (bool) lines_aa );
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|