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;
296 QString layerType()
const override;
300 QVariantMap properties()
const override;
302 QColor color()
const override;
307 bool isCompatibleWithSymbol(
QgsSymbol *symbol )
const override;
308 bool canCauseArtifactsBetweenAdjacentTiles()
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 );
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Class defining color to render mesh datasets.
ColoringMethod
Defines how the color is defined.
Represents a simple line renderer with width and color varying depending on values.
A symbol layer that represents vector layer line feature as interpolated line The interpolation is do...
Represents a width than can vary depending on values.
Layer tree node points to a map layer.
A class to represent a 2D point.
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
RenderUnit
Rendering size units.
@ RenderMillimeters
Millimeters.
const double DEFAULT_LINE_WIDTH