|
QGIS API Documentation
2.6.0-Brighton
|
Perform transforms between map coordinates and device coordinates. More...
#include <qgsmaptopixel.h>
Public Member Functions | |
| QgsMapToPixel (double mapUnitsPerPixel=0, double ymax=0, double ymin=0, double xmin=0) | |
| ~QgsMapToPixel () | |
| destructor | |
| QgsPoint | transform (const QgsPoint &p) const |
| void | transform (QgsPoint *p) const |
| QgsPoint | transform (double x, double y) const |
| void | transformInPlace (double &x, double &y) const |
| void | transformInPlace (QVector< double > &x, QVector< double > &y) const |
| QgsPoint | toMapCoordinates (int x, int y) const |
| QgsPoint | toMapCoordinatesF (double x, double y) const |
| QgsPoint | toMapCoordinates (QPoint p) const |
| QgsPoint | toMapPoint (double x, double y) const |
| void | setMapUnitsPerPixel (double mapUnitsPerPixel) |
| double | mapUnitsPerPixel () const |
| Return current map units per pixel. | |
| void | setYMaximum (double ymax) |
| Set maximum y value. | |
| void | setYMinimum (double ymin) |
| Set minimum y value. | |
| void | setXMinimum (double xmin) |
| set minimum x value | |
| void | setParameters (double mapUnitsPerPixel, double xmin, double ymin, double ymax) |
| QString | showParameters () |
| String representation of the parameters used in the transform. | |
Perform transforms between map coordinates and device coordinates.
This class can convert device coordinates to map coordinates and vice versa.
| QgsMapToPixel::QgsMapToPixel | ( | double | mapUnitsPerPixel = 0, |
| double | ymax = 0, |
||
| double | ymin = 0, |
||
| double | xmin = 0 |
||
| ) |
| QgsMapToPixel::~QgsMapToPixel | ( | ) |
destructor
| double QgsMapToPixel::mapUnitsPerPixel | ( | ) | const |
Return current map units per pixel.
| void QgsMapToPixel::setMapUnitsPerPixel | ( | double | mapUnitsPerPixel | ) |
Set map units per pixel
| mapUnitsPerPixel | Map units per pixel |
| void QgsMapToPixel::setParameters | ( | double | mapUnitsPerPixel, |
| double | xmin, | ||
| double | ymin, | ||
| double | ymax | ||
| ) |
Set parameters for use in transforming coordinates
| mapUnitsPerPixel | Map units per pixel |
| xmin | Minimum x value |
| ymin | Minimum y value |
| ymax | Maximum y value |
| void QgsMapToPixel::setXMinimum | ( | double | xmin | ) |
set minimum x value
| void QgsMapToPixel::setYMaximum | ( | double | ymax | ) |
Set maximum y value.
| void QgsMapToPixel::setYMinimum | ( | double | ymin | ) |
Set minimum y value.
| QString QgsMapToPixel::showParameters | ( | ) |
String representation of the parameters used in the transform.
| QgsPoint QgsMapToPixel::toMapCoordinates | ( | int | x, |
| int | y | ||
| ) | const |
| QgsPoint QgsMapToPixel::toMapCoordinates | ( | QPoint | p | ) | const |
Tranform device coordinates to map (world) coordinates
| p | Point to be converted to map cooordinates |
| QgsPoint QgsMapToPixel::toMapCoordinatesF | ( | double | x, |
| double | y | ||
| ) | const |
Transform device coordinates to map (world) coordinates
| QgsPoint QgsMapToPixel::toMapPoint | ( | double | x, |
| double | y | ||
| ) | const |
Transform the point from map (world) coordinates to device coordinates
| p | Point to transform |
| void QgsMapToPixel::transform | ( | QgsPoint * | p | ) | const |
| QgsPoint QgsMapToPixel::transform | ( | double | x, |
| double | y | ||
| ) | const |
Transform the point specified by x,y from map (world) coordinates to device coordinates
| x | x cordinate o point to transform |
| y | y coordinate of point to transform |
| void QgsMapToPixel::transformInPlace | ( | double & | x, |
| double & | y | ||
| ) | const |
Tranform device coordinates to map (world) coordinates
| x | x coordinate of point to be converted to map cooordinates |
| y | y coordinate of point to be converted to map cooordinates |
| void QgsMapToPixel::transformInPlace | ( | QVector< double > & | x, |
| QVector< double > & | y | ||
| ) | const |
1.8.1.2