QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
Struct for storing maximum and minimum scales for measurements in map units. More...
#include <qgsmapunitscale.h>
Public Member Functions | |
QgsMapUnitScale (double minScale=0.0, double maxScale=0.0) | |
Constructor for QgsMapUnitScale. | |
double | computeMapUnitsPerPixel (const QgsRenderContext &c) const |
Computes a map units per pixel scaling factor, respecting the minimum and maximum scales set for the object. | |
bool | operator!= (const QgsMapUnitScale &other) const |
bool | operator== (const QgsMapUnitScale &other) const |
Public Attributes | |
double | maxScale |
The maximum scale, or 0.0 if unset. | |
double | maxSizeMM = 0.0 |
The maximum size in millimeters, or 0.0 if unset. | |
bool | maxSizeMMEnabled = false |
Whether the maximum size in mm should be respected. | |
double | minScale |
The minimum scale, or 0.0 if unset. | |
double | minSizeMM = 0.0 |
The minimum size in millimeters, or 0.0 if unset. | |
bool | minSizeMMEnabled = false |
Whether the minimum size in mm should be respected. | |
Struct for storing maximum and minimum scales for measurements in map units.
For measurements in map units, a minimum and a maximum scale can be defined. Outside this range, the measurements aren't scaled anymore proportionally to the map scale.
Definition at line 36 of file qgsmapunitscale.h.
|
inlineexplicit |
Constructor for QgsMapUnitScale.
minScale | minimum allowed scale, or 0.0 if no minimum scale set |
maxScale | maximum allowed scale, or 0.0 if no maximum scale set The scale values indicates the scale denominator, e.g. 1000.0 for a 1:1000 map. |
Definition at line 46 of file qgsmapunitscale.h.
double QgsMapUnitScale::computeMapUnitsPerPixel | ( | const QgsRenderContext & | c | ) | const |
Computes a map units per pixel scaling factor, respecting the minimum and maximum scales set for the object.
c | render context |
Definition at line 20 of file qgsmapunitscale.cpp.
|
inline |
Definition at line 90 of file qgsmapunitscale.h.
|
inline |
Definition at line 80 of file qgsmapunitscale.h.
double QgsMapUnitScale::maxScale |
The maximum scale, or 0.0 if unset.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
Definition at line 61 of file qgsmapunitscale.h.
double QgsMapUnitScale::maxSizeMM = 0.0 |
The maximum size in millimeters, or 0.0 if unset.
Definition at line 70 of file qgsmapunitscale.h.
bool QgsMapUnitScale::maxSizeMMEnabled = false |
Whether the maximum size in mm should be respected.
Definition at line 68 of file qgsmapunitscale.h.
double QgsMapUnitScale::minScale |
The minimum scale, or 0.0 if unset.
The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
Definition at line 55 of file qgsmapunitscale.h.
double QgsMapUnitScale::minSizeMM = 0.0 |
The minimum size in millimeters, or 0.0 if unset.
Definition at line 66 of file qgsmapunitscale.h.
bool QgsMapUnitScale::minSizeMMEnabled = false |
Whether the minimum size in mm should be respected.
Definition at line 64 of file qgsmapunitscale.h.