|
32 | 32 | #include "qgsrectangle.h"
|
33 | 33 | #include "qgsvectorsimplifymethod.h"
|
34 | 34 | #include "qgsdistancearea.h"
|
| 35 | +#include "qgscoordinatetransformcontext.h" |
35 | 36 |
|
36 | 37 | class QPainter;
|
37 | 38 | class QgsAbstractGeometry;
|
@@ -131,6 +132,26 @@ class CORE_EXPORT QgsRenderContext
|
131 | 132 | */
|
132 | 133 | const QgsDistanceArea &distanceArea() const { return mDistanceArea; }
|
133 | 134 |
|
| 135 | + /** |
| 136 | + * Returns the context's coordinate transform context, which stores various |
| 137 | + * information regarding which datum transforms should be used when transforming points |
| 138 | + * from a source to destination coordinate reference system. |
| 139 | + * |
| 140 | + * \since QGIS 3.0 |
| 141 | + * \see setTransformContext() |
| 142 | + */ |
| 143 | + QgsCoordinateTransformContext transformContext() const; |
| 144 | + |
| 145 | + /** |
| 146 | + * Sets the context's coordinate transform \a context, which stores various |
| 147 | + * information regarding which datum transforms should be used when transforming points |
| 148 | + * from a source to destination coordinate reference system. |
| 149 | + * |
| 150 | + * \since QGIS 3.0 |
| 151 | + * \see transformContext() |
| 152 | + */ |
| 153 | + void setTransformContext( const QgsCoordinateTransformContext &context ); |
| 154 | + |
134 | 155 | const QgsRectangle &extent() const {return mExtent;}
|
135 | 156 |
|
136 | 157 | const QgsMapToPixel &mapToPixel() const {return mMapToPixel;}
|
@@ -397,6 +418,11 @@ class CORE_EXPORT QgsRenderContext
|
397 | 418 | double mSegmentationTolerance = M_PI_2 / 90;
|
398 | 419 |
|
399 | 420 | QgsAbstractGeometry::SegmentationToleranceType mSegmentationToleranceType = QgsAbstractGeometry::MaximumAngle;
|
| 421 | + |
| 422 | + QgsCoordinateTransformContext mTransformContext; |
| 423 | +#ifdef QGISDEBUG |
| 424 | + bool mHasTransformContext = false; |
| 425 | +#endif |
400 | 426 | };
|
401 | 427 |
|
402 | 428 | Q_DECLARE_OPERATORS_FOR_FLAGS( QgsRenderContext::Flags )
|
|
0 commit comments