18 #ifndef QGSMAPUNITSCALE_H 19 #define QGSMAPUNITSCALE_H 42 : minScale( minScale )
43 , maxScale( maxScale )
44 , minSizeMMEnabled( false )
46 , maxSizeMMEnabled( false )
75 mup = qMin( mup / ( minScale * renderScale ), mup );
79 mup = qMax( mup / ( maxScale * renderScale ), mup );
101 #endif // QGSMAPUNITSCALE_H double rendererScale() const
double minSizeMM
The minimum size in millimeters, or 0.0 if unset.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
double computeMapUnitsPerPixel(const QgsRenderContext &c) const
Computes a map units per pixel scaling factor, respecting the minimum and maximum scales set for the ...
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
Compare two doubles (but allow some difference)
double maxScale
The maximum scale, or 0.0 if unset.
bool operator!=(const QgsMapUnitScale &other) const
bool minSizeMMEnabled
Whether the minimum size in mm should be respected.
double mapUnitsPerPixel() const
Return current map units per pixel.
bool operator==(const QgsMapUnitScale &other) const
Contains information about the context of a rendering operation.
QgsMapUnitScale(double minScale=0.0, double maxScale=0.0)
Constructor for QgsMapUnitScale.
const QgsMapToPixel & mapToPixel() const
double maxSizeMM
The maximum size in millimeters, or 0.0 if unset.
Struct for storing maximum and minimum scales for measurements in map units.
double minScale
The minimum scale, or 0.0 if unset.
bool maxSizeMMEnabled
Whether the maximum size in mm should be respected.