QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
22 : mRenderContext( context )
29 return mWorldTransform;
34 mWorldTransform = transform;
39 return mDistanceRange;
44 mDistanceRange = range;
49 return mElevationRange;
54 mElevationRange = range;
86 #define POINTS_TO_MM 2.83464567
87 #define INCH_TO_MM 25.4
91 double conversionFactor = 1.0;
92 const double pixelsPerMillimeter = mDpi / 25.4;
96 conversionFactor = pixelsPerMillimeter;
104 conversionFactor = pixelsPerMillimeter *
INCH_TO_MM;
109 conversionFactor = 1.0 / mMapUnitsPerDistancePixel;
113 conversionFactor = 1.0;
120 conversionFactor = 1.0;
124 return size * conversionFactor;
129 return qgsDoubleNear( mMaxErrorMapUnits, other.mMaxErrorMapUnits )
130 &&
qgsDoubleNear( mMapUnitsPerDistancePixel, other.mMapUnitsPerDistancePixel )
132 && mDistanceRange == other.mDistanceRange
133 && mElevationRange == other.mElevationRange;
138 return !( *
this == other );
143 return Qgis::ProfileGeneratorFlags();
148 , mResults( results )
Encapsulates the context of identifying profile results.
QgsDoubleRange distanceRange() const
Returns the range of distances to include in the render.
virtual ~QgsAbstractProfileResults()
RenderUnit
Rendering size units.
void setElevationRange(const QgsDoubleRange &range)
Sets the range of elevations to include in the render.
QgsProfileIdentifyResults(QgsMapLayer *layer=nullptr, const QVector< QVariantMap > &results=QVector< QVariantMap >())
Constructor for QgsProfileIdentifyResult, with the associated map layer.
Encapsulates results of snapping a profile point.
@ RenderPoints
Points (e.g., for font sizes)
Abstract base class for objects which generate elevation profiles.
@ RenderPercentage
Percentage of another measurement (e.g., canvas size, feature size)
Contains information about the context of a rendering operation.
void setDistanceRange(const QgsDoubleRange &range)
Sets the range of distances to include in the render.
@ RenderMillimeters
Millimeters.
Encapsulates the context of snapping a profile point.
virtual QVector< QgsProfileIdentifyResults > identify(const QgsProfilePoint &point, const QgsProfileIdentifyContext &context)
Identify results visible at the specified profile point.
Encapsulates a point on a distance-elevation profile.
bool operator!=(const QgsProfileGenerationContext &other) const
Encapsulates the context in which an elevation profile is to be generated.
virtual void copyPropertiesFromGenerator(const QgsAbstractProfileGenerator *generator)
Copies properties from specified generator to the results object.
bool operator==(const QgsProfileGenerationContext &other) const
double convertDistanceToPixels(double size, QgsUnitTypes::RenderUnit unit) const
Converts a distance size from the specified units to pixels.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
virtual ~QgsAbstractProfileGenerator()
QgsProfileRenderContext(QgsRenderContext &context)
Constructor for QgsProfileRenderContext, with the specified embedded render context.
QgsRange which stores a range of double values.
Base class for all map layer types. This is the base class for all map layer types (vector,...
const QTransform & worldTransform() const
Returns the transform from world coordinates to painter coordinates.
@ RenderMetersInMapUnits
Meters value as Map units.
@ RenderUnknownUnit
Mixed or unknown units.
virtual Qgis::ProfileGeneratorFlags flags() const
Returns flags which reflect how the profile generator operates.
QgsDoubleRange elevationRange() const
Returns the range of elevations to include in the render.
@ RenderMapUnits
Map units.
virtual QgsProfileSnapResult snapPoint(const QgsProfilePoint &point, const QgsProfileSnapContext &context)
Snaps a point to the generated elevation profile.
void setWorldTransform(const QTransform &transform)
Sets the transform from world coordinates to painter coordinates.