Class: QgsMapUnitScale¶
- class qgis.core.QgsMapUnitScale¶
Bases:
sip.wrapper
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.
QgsMapUnitScale(minScale: float = 0, maxScale: float = 0) Constructor for QgsMapUnitScale
- Parameters:
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.
QgsMapUnitScale(
QgsMapUnitScale
)Methods
Computes a map units per pixel scaling factor, respecting the minimum and maximum scales set for the object.
Attributes
- computeMapUnitsPerPixel(self, c: QgsRenderContext) float ¶
Computes a map units per pixel scaling factor, respecting the minimum and maximum scales set for the object.
- Parameters:
c (QgsRenderContext) – render context
- Return type:
float
- Returns:
map units per pixel, limited between minimum and maximum scales
- maxScale¶
- maxSizeMM¶
- maxSizeMMEnabled¶
- minScale¶
- minSizeMM¶
- minSizeMMEnabled¶