|
78 | 78 | #include "qgsattributetabledisplay.h"
|
79 | 79 | #include "qgsdistancearea.h"
|
80 | 80 | #include "qgsvectordataprovider.h"
|
81 |
| -#ifdef Q_WS_X11 |
82 |
| -#include "qgsclipper.h" |
83 |
| -#endif |
84 | 81 | #include "qgssvgcache.h"
|
85 | 82 | #include "qgsspatialrefsys.h"
|
86 | 83 | #include "qgis.h" //for globals
|
@@ -463,22 +460,6 @@ unsigned char* QgsVectorLayer::drawLineString(unsigned char* feature,
|
463 | 460 |
|
464 | 461 | transformPoints(x, y, z, mtp, projectionsEnabledFlag);
|
465 | 462 |
|
466 |
| -#if defined(Q_WS_X11) |
467 |
| - // Work around a +/- 32768 limitation on coordinates in X11 |
468 |
| - |
469 |
| - // Look through the x and y coordinates and see if there are any |
470 |
| - // that need trimming. If one is found, there's no need to look at |
471 |
| - // the rest of them so end the loop at that point. |
472 |
| - for (register unsigned int i = 0; i < nPoints; ++i) |
473 |
| - if (std::abs(x[i]) > QgsClipper::maxX || |
474 |
| - std::abs(y[i]) > QgsClipper::maxY) |
475 |
| - { |
476 |
| - QgsClipper::trimFeature(x, y, true); // true = polyline |
477 |
| - nPoints = x.size(); // trimming may change nPoints. |
478 |
| - break; |
479 |
| - } |
480 |
| -#endif |
481 |
| - |
482 | 463 | // set up QPolygonF class with transformed points
|
483 | 464 | QPolygonF pa(nPoints);
|
484 | 465 | for (register unsigned int i = 0; i < nPoints; ++i)
|
@@ -583,33 +564,6 @@ std::cerr << jdx << ": "
|
583 | 564 |
|
584 | 565 | transformPoints(ring->first, ring->second, zVector, mtp, projectionsEnabledFlag);
|
585 | 566 |
|
586 |
| -#if defined(Q_WS_X11) |
587 |
| - // Work around a +/- 32768 limitation on coordinates in X11 |
588 |
| - |
589 |
| - // Look through the x and y coordinates and see if there are any |
590 |
| - // that need trimming. If one is found, there's no need to look at |
591 |
| - // the rest of them so end the loop at that point. |
592 |
| - for (register unsigned int i = 0; i < nPoints; ++i) |
593 |
| - { |
594 |
| - if (std::abs(ring->first[i]) > QgsClipper::maxX || |
595 |
| - std::abs(ring->second[i]) > QgsClipper::maxY) |
596 |
| - { |
597 |
| - QgsClipper::trimFeature(ring->first, ring->second, false); |
598 |
| - /* |
599 |
| -#ifdef QGISDEBUG |
600 |
| -std::cerr << "Trimmed points (" << ring->first.size() << ")\n"; |
601 |
| -for (int i = 0; i < ring->first.size(); ++i) |
602 |
| -std::cerr << i << ": " << ring->first[i] |
603 |
| -<< ", " << ring->second[i] << '\n'; |
604 |
| -#endif |
605 |
| -*/ |
606 |
| - break; |
607 |
| - } |
608 |
| - //std::cout << "POLYGONTRANSFORM: " << ring->first[i] << ", " << ring->second[i] << std::endl; |
609 |
| - } |
610 |
| - |
611 |
| -#endif |
612 |
| - |
613 | 567 | // Don't bother keeping the ring if it has been trimmed out of
|
614 | 568 | // existence.
|
615 | 569 | if (ring->first.size() == 0)
|
@@ -696,27 +650,6 @@ std::cerr << i << ": " << ring->first[i]
|
696 | 650 | << ", " << outerRingPt.y() << '\n';
|
697 | 651 | #endif
|
698 | 652 |
|
699 |
| - /* |
700 |
| - // A bit of code to aid in working out what values of |
701 |
| - // QgsClipper::minX, etc cause the X11 zoom bug. |
702 |
| - int largestX = -std::numeric_limits<int>::max(); |
703 |
| - int smallestX = std::numeric_limits<int>::max(); |
704 |
| - int largestY = -std::numeric_limits<int>::max(); |
705 |
| - int smallestY = std::numeric_limits<int>::max(); |
706 |
| -
|
707 |
| - for (int i = 0; i < pa.size(); ++i) |
708 |
| - { |
709 |
| - largestX = std::max(largestX, pa.point(i).x()); |
710 |
| - smallestX = std::min(smallestX, pa.point(i).x()); |
711 |
| - largestY = std::max(largestY, pa.point(i).y()); |
712 |
| - smallestY = std::min(smallestY, pa.point(i).y()); |
713 |
| - } |
714 |
| - std::cerr << "Largest X coordinate was " << largestX << '\n'; |
715 |
| - std::cerr << "Smallest X coordinate was " << smallestX << '\n'; |
716 |
| - std::cerr << "Largest Y coordinate was " << largestY << '\n'; |
717 |
| - std::cerr << "Smallest Y coordinate was " << smallestY << '\n'; |
718 |
| - */ |
719 |
| - |
720 | 653 | //preserve a copy of the brush and pen before we start fiddling with it
|
721 | 654 | QBrush brush = p->brush(); //to be kept as original
|
722 | 655 | QPen pen = p->pen(); // to be kept original
|
@@ -3194,13 +3127,6 @@ void QgsVectorLayer::drawFeature(QPainter* p, QgsFeature* fet, QgsMapToPixel * t
|
3194 | 3127 | transformPoint(x, y, theMapToPixelTransform, projectionsEnabledFlag);
|
3195 | 3128 | QPointF pt(x - (marker->width()/2), y - (marker->height()/2));
|
3196 | 3129 |
|
3197 |
| -#if defined(Q_WS_X11) |
3198 |
| - // Work around a +/- 32768 limitation on coordinates in X11 |
3199 |
| - if (std::abs(x) > QgsClipper::maxX || |
3200 |
| - std::abs(y) > QgsClipper::maxY) |
3201 |
| - needToTrim = true; |
3202 |
| - else |
3203 |
| -#endif |
3204 | 3130 | p->drawPixmap(pt, *marker);
|
3205 | 3131 | }
|
3206 | 3132 | p->restore();
|
|
0 commit comments