Skip to content

Commit 0aa3ca3

Browse files
author
mhugent
committed
More efficient clipping parameter (same as in threading branch)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14185 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f1ea45c commit 0aa3ca3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/core/qgsclipper.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@
2525

2626
// But the static members must be initialised outside the class! (or GCC 4 dies)
2727

28-
const double QgsClipper::MAX_X = 30000;
29-
const double QgsClipper::MIN_X = -30000;
30-
const double QgsClipper::MAX_Y = 30000;
31-
const double QgsClipper::MIN_Y = -30000;
28+
// Qt also does clipping when the coordinates go over +/- 32767
29+
// moreover from Qt 4.6, Qt clips also when the width/height of a painter path
30+
// is more than 32767. Since we want to avoid clipping by Qt (because it is slow)
31+
// we set coordinate limit to less than 32767 / 2
32+
const double QgsClipper::MAX_X = 16000;
33+
const double QgsClipper::MIN_X = -16000;
34+
const double QgsClipper::MAX_Y = 16000;
35+
const double QgsClipper::MIN_Y = -16000;
3236

3337
const double QgsClipper::SMALL_NUM = 1e-12;

0 commit comments

Comments
 (0)