20 #include "qgis_core.h"
51 QgsMapToPixel(
double mapUnitsPerPixel,
double centerX,
double centerY,
int widthPixels,
int heightPixels,
double rotation );
92 QgsPointXY transform( qreal x, qreal y )
const;
99 void transformInPlace(
double &x,
double &y )
const;
102 void transformInPlace(
float &x,
float &y )
const SIP_SKIP;
115 assert( x.size() == y.size() );
116 for (
int i = 0; i < x.size(); ++i )
117 transformInPlace( x[i], y[i] );
122 QgsPointXY toMapCoordinates(
int x,
int y )
const;
132 QgsPointXY toMapCoordinates( QPoint p )
const;
144 void setMapUnitsPerPixel(
double mapUnitsPerPixel );
147 double mapUnitsPerPixel()
const;
154 int mapWidth()
const;
160 int mapHeight()
const;
169 void setMapRotation(
double degrees,
double cx,
double cy );
175 double mapRotation()
const;
187 void setParameters(
double mapUnitsPerPixel,
double centerX,
double centerY,
int widthPixels,
int heightPixels,
double rotation );
190 QString showParameters()
const;
192 QTransform transform()
const;
209 double mMapUnitsPerPixel = 1;
212 double mRotation = 0.0;
213 double mXCenter = 0.5;
214 double mYCenter = 0.5;
223 #endif // QGSMAPTOPIXEL