@@ -13,6 +13,14 @@ class QgsMapRenderer : QObject
1313
1414 public:
1515
16+ /* *Output units for pen width and point marker width/height*/
17+ enum OutputUnits
18+ {
19+ Millimeters,
20+ Pixels
21+ // MAP_UNITS probably supported in future versions
22+ };
23+
1624 // ! constructor
1725 QgsMapRenderer ();
1826
@@ -26,11 +34,14 @@ class QgsMapRenderer : QObject
2634 bool setExtent (const QgsRectangle& extent);
2735
2836 // ! returns current extent
29- QgsRectangle extent ();
37+ QgsRectangle extent () const ;
3038
3139 const QgsMapToPixel* coordinateTransform ();
3240
3341 double scale () const ;
42+ /* *Sets scale for scale based visibility. Normally, the scale is calculated automatically. This
43+ function is only used to force a preview scale (e.g. for print composer)*/
44+ void setScale ( double scale );
3445 double mapUnitsPerPixel () const ;
3546
3647 int width () const ;
@@ -40,6 +51,7 @@ class QgsMapRenderer : QObject
4051 // ! Recalculate the map scale
4152 void updateScale ();
4253
54+ QgsDistanceArea* distanceArea ();
4355 QGis::UnitType mapUnits () const ;
4456 void setMapUnits (QGis::UnitType u);
4557
@@ -77,6 +89,10 @@ class QgsMapRenderer : QObject
7789 // ! returns CRS ID of destination spatial reference system
7890 const QgsCoordinateReferenceSystem& destinationSrs ();
7991
92+ void setOutputUnits ( OutputUnits u );
93+
94+ OutputUnits outputUnits () const ;
95+
8096 // ! returns current extent of layer set
8197 QgsRectangle fullExtent ();
8298
@@ -95,9 +111,12 @@ class QgsMapRenderer : QObject
95111 // ! write settings
96112 bool writeXML (QDomNode & theNode, QDomDocument & theDoc);
97113
114+ // ! Accessor for render context
115+ QgsRenderContext* rendererContext ();
116+
98117 signals:
99118
100- void setProgress (int current, int total);
119+ void drawingProgress (int current, int total);
101120
102121 void hasCrsTransformEnabled (bool flag);
103122
0 commit comments