QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSINTERPOLATEDLINERENDERER_H
17 #define QGSINTERPOLATEDLINERENDERER_H
64 void setColor(
const QColor &color );
67 QColor color(
double magnitude )
const;
73 void setColoringMethod( ColoringMethod coloringMethod );
85 QColor singleColor()
const;
101 void graduatedColors(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
105 QColor mSingleColor = Qt::black;
109 QLinearGradient makeSimpleLinearGradient(
const QColor &color1,
const QColor &color2 )
const;
112 int itemColorIndexInf(
double value )
const;
114 void graduatedColorsExact(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors,
const QList<QLinearGradient> &gradients )
const;
115 void graduatedColorsInterpolated(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
116 void graduatedColorsDiscrete(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
130 double minimumValue()
const;
132 void setMinimumValue(
double minimumValue );
135 double maximumValue()
const;
137 void setMaximumValue(
double maximumValue );
140 double minimumWidth()
const;
142 void setMinimumWidth(
double minimumWidth );
145 double maximumWidth()
const;
147 void setMaximumWidth(
double maximumWidth );
150 bool ignoreOutOfRange()
const;
152 void setIgnoreOutOfRange(
bool ignoreOutOfRange );
155 bool useAbsoluteValue()
const;
157 void setUseAbsoluteValue(
bool useAbsoluteValue );
160 bool isVariableWidth()
const;
162 void setIsVariableWidth(
bool isVariableWidth );
165 double fixedStrokeWidth()
const;
167 void setFixedStrokeWidth(
double fixedWidth );
170 double strokeWidth(
double value )
const;
178 bool mIsWidthVariable =
false;
182 double mMinimumValue = 0;
183 double mMaximumValue = 10;
185 double mMaximumWidth = 3;
186 bool mIgnoreOutOfRange =
false;
187 bool mUseAbsoluteValue =
false;
189 mutable double mLinearCoef = 1;
190 mutable bool mNeedUpdateFormula =
true;
191 void updateLinearFormula()
const;
249 void render(
double valueColor1,
double valueColor2,
double valueWidth1,
double valueWidth2,
const QgsPointXY &point1,
const QgsPointXY &point2,
QgsRenderContext &context )
const;
257 void renderInDeviceCoordinates(
double valueColor1,
double valueColor2,
double valueWidth1,
double valueWidth2, QPointF point1, QPointF point2,
QgsRenderContext &context )
const;
264 void setSelected(
bool selected );
271 void adjustLine(
double value,
double value1,
double value2,
double &width,
double &adjusting )
const;
272 bool mSelected =
false;
295 Qgis::SymbolLayerFlags
flags()
const override;
302 QColor
color()
const override;
315 Q_DECL_DEPRECATED
void setExpressionsStringForWidth(
const QString &start,
const QString &end )
SIP_DEPRECATED;
322 Q_DECL_DEPRECATED QString startValueExpressionForWidth()
const SIP_DEPRECATED;
329 Q_DECL_DEPRECATED QString endValueExpressionForWidth()
const SIP_DEPRECATED;
364 Q_DECL_DEPRECATED
void setExpressionsStringForColor(
const QString &start,
const QString &end )
SIP_DEPRECATED;
371 Q_DECL_DEPRECATED QString startValueExpressionForColor()
const SIP_DEPRECATED;
378 Q_DECL_DEPRECATED QString endValueExpressionForColor()
const SIP_DEPRECATED;
401 QVector< QPolygonF > mLineParts;
402 bool mRenderingFeature =
false;
404 void render(
const QVector< QPolygonF > &parts,
QgsRenderContext &context );
406 QVariant colorRampShaderProperties()
const;
407 static QgsColorRampShader createColorRampShaderFromProperties(
const QVariant &properties );
411 #endif // QGSINTERPOLATEDLINERENDERER_H
void setWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the line's width.
virtual void startFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called before the layer will be rendered for a particular feature.
RenderUnit
Rendering size units.
virtual void renderPolyline(const QPolygonF &points, QgsSymbolRenderContext &context)=0
Renders the line symbol layer along the line joining points, using the given render context.
virtual bool isCompatibleWithSymbol(QgsSymbol *symbol) const
Returns if the layer can be used below the specified symbol.
The class is used as a container of context for various read/write operations on other objects.
virtual Qgis::SymbolLayerFlags flags() const
Returns flags which control the symbol layer's behavior.
ColoringMethod
Defines how the color is defined.
Contains information about the context of a rendering operation.
@ RenderMillimeters
Millimeters.
Abstract base class for all rendered symbols.
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
void drawPreviewIcon(QgsSymbolRenderContext &context, QSize size) override
virtual QgsSymbolLayer * clone() const =0
Shall be reimplemented by subclasses to create a deep copy of the instance.
Represents a width than can vary depending on values.
virtual void stopFeatureRender(const QgsFeature &feature, QgsRenderContext &context)
Called after the layer has been rendered for a particular feature.
Layer tree node points to a map layer.
const double DEFAULT_LINE_WIDTH
Class defining color to render mesh datasets. The color can vary depending on the dataset value.
virtual QVariantMap properties() const =0
Should be reimplemented by subclasses to return a string map that contains the configuration informat...
virtual bool canCauseArtifactsBetweenAdjacentTiles() const
Returns true if the symbol layer rendering can cause visible artifacts across a single feature when t...
A class to represent a 2D point.
A symbol layer that represents vector layer line feature as interpolated line The interpolation is do...
virtual void stopRender(QgsSymbolRenderContext &context)=0
Called after a set of rendering operations has finished on the supplied render context.
virtual QString layerType() const =0
Returns a string that represents this layer type.
virtual QColor color() const
Returns the "representative" color of the symbol layer.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
virtual void startRender(QgsSymbolRenderContext &context)=0
Called before a set of rendering operations commences on the supplied render context.
Represents a simple line renderer with width and color varying depending on values.
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the line's width.