[QGIS Commit] r14185 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Sep 3 03:39:07 EDT 2010


Author: mhugent
Date: 2010-09-03 07:39:07 +0000 (Fri, 03 Sep 2010)
New Revision: 14185

Modified:
   trunk/qgis/src/core/qgsclipper.cpp
Log:
More efficient clipping parameter (same as in threading branch)

Modified: trunk/qgis/src/core/qgsclipper.cpp
===================================================================
--- trunk/qgis/src/core/qgsclipper.cpp	2010-09-02 18:30:55 UTC (rev 14184)
+++ trunk/qgis/src/core/qgsclipper.cpp	2010-09-03 07:39:07 UTC (rev 14185)
@@ -25,9 +25,13 @@
 
 // But the static members must be initialised outside the class! (or GCC 4 dies)
 
-const double QgsClipper::MAX_X =  30000;
-const double QgsClipper::MIN_X = -30000;
-const double QgsClipper::MAX_Y =  30000;
-const double QgsClipper::MIN_Y = -30000;
+// Qt also does clipping when the coordinates go over +/- 32767
+// moreover from Qt 4.6, Qt clips also when the width/height of a painter path
+// is more than 32767. Since we want to avoid clipping by Qt (because it is slow)
+// we set coordinate limit to less than 32767 / 2
+const double QgsClipper::MAX_X =  16000;
+const double QgsClipper::MIN_X = -16000;
+const double QgsClipper::MAX_Y =  16000;
+const double QgsClipper::MIN_Y = -16000;
 
 const double QgsClipper::SMALL_NUM = 1e-12;



More information about the QGIS-commit mailing list