16#ifndef QGSINTERPOLATEDLINERENDERER_H
17#define QGSINTERPOLATEDLINERENDERER_H
62 void setColor(
const QColor &color );
65 QColor color(
double magnitude )
const;
71 void setColoringMethod( ColoringMethod coloringMethod );
83 QColor singleColor()
const;
99 void graduatedColors(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
103 QColor mSingleColor = Qt::black;
107 QLinearGradient makeSimpleLinearGradient(
const QColor &color1,
const QColor &color2 )
const;
110 int itemColorIndexInf(
double value )
const;
112 void graduatedColorsExact(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors,
const QList<QLinearGradient> &gradients )
const;
113 void graduatedColorsInterpolated(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
114 void graduatedColorsDiscrete(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
128 double minimumValue()
const;
130 void setMinimumValue(
double minimumValue );
133 double maximumValue()
const;
135 void setMaximumValue(
double maximumValue );
138 double minimumWidth()
const;
140 void setMinimumWidth(
double minimumWidth );
143 double maximumWidth()
const;
145 void setMaximumWidth(
double maximumWidth );
148 bool ignoreOutOfRange()
const;
150 void setIgnoreOutOfRange(
bool ignoreOutOfRange );
153 bool useAbsoluteValue()
const;
155 void setUseAbsoluteValue(
bool useAbsoluteValue );
158 bool isVariableWidth()
const;
160 void setIsVariableWidth(
bool isVariableWidth );
163 double fixedStrokeWidth()
const;
165 void setFixedStrokeWidth(
double fixedWidth );
168 double strokeWidth(
double value )
const;
176 bool mIsWidthVariable =
false;
180 double mMinimumValue = 0;
181 double mMaximumValue = 10;
183 double mMaximumWidth = 3;
184 bool mIgnoreOutOfRange =
false;
185 bool mUseAbsoluteValue =
false;
187 mutable double mLinearCoef = 1;
188 mutable bool mNeedUpdateFormula =
true;
189 void updateLinearFormula()
const;
247 void render(
double valueColor1,
double valueColor2,
double valueWidth1,
double valueWidth2,
const QgsPointXY &point1,
const QgsPointXY &point2,
QgsRenderContext &context )
const;
255 void renderInDeviceCoordinates(
double valueColor1,
double valueColor2,
double valueWidth1,
double valueWidth2, QPointF point1, QPointF point2,
QgsRenderContext &context )
const;
262 void setSelected(
bool selected );
269 void adjustLine(
double value,
double value1,
double value2,
double &width,
double &adjusting )
const;
270 bool mSelected =
false;
293 Qgis::SymbolLayerFlags flags()
const override;
294 QString layerType()
const override;
298 QVariantMap properties()
const override;
300 QColor color()
const override;
305 bool canCauseArtifactsBetweenAdjacentTiles()
const override;
312 Q_DECL_DEPRECATED
void setExpressionsStringForWidth(
const QString &start,
const QString &end )
SIP_DEPRECATED;
319 Q_DECL_DEPRECATED QString startValueExpressionForWidth()
const SIP_DEPRECATED;
326 Q_DECL_DEPRECATED QString endValueExpressionForWidth()
const SIP_DEPRECATED;
361 Q_DECL_DEPRECATED
void setExpressionsStringForColor(
const QString &start,
const QString &end )
SIP_DEPRECATED;
368 Q_DECL_DEPRECATED QString startValueExpressionForColor()
const SIP_DEPRECATED;
375 Q_DECL_DEPRECATED QString endValueExpressionForColor()
const SIP_DEPRECATED;
398 QVector< QPolygonF > mLineParts;
399 bool mRenderingFeature =
false;
401 void render(
const QVector< QPolygonF > &parts,
QgsRenderContext &context );
403 QVariant colorRampShaderProperties()
const;
404 static QgsColorRampShader createColorRampShaderFromProperties(
const QVariant &properties );
RenderUnit
Rendering size units.
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.
const double DEFAULT_LINE_WIDTH