File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ class QgsMapTool : QObject
7070 //! called when map tool is being deactivated
7171 virtual void deactivate();
7272
73+ //! returns pointer to the tool's map canvas
74+ QgsMapCanvas* canvas();
75+
7376 protected:
7477
7578 //! constructor takes map canvas as a parameter
@@ -84,6 +87,9 @@ class QgsMapTool : QObject
8487 //! trnasformation from map coordinates to layer's coordinates
8588 QgsPoint toLayerCoordinates(QgsMapLayer* layer, const QgsPoint& point);
8689
90+ //!transformation from layer's coordinates to map coordinates (which is different in case reprojection is used)
91+ QgsPoint toMapCoordinates( QgsMapLayer* layer, const QgsPoint& point );
92+
8793 //! trnasformation of the rect from map coordinates to layer's coordinates
8894 QgsRectangle toLayerCoordinates(QgsMapLayer* layer, const QgsRectangle& rect);
8995
You can’t perform that action at this time.
0 commit comments