16 #ifndef QGSINTERPOLATEDLINERENDERER_H
17 #define QGSINTERPOLATEDLINERENDERER_H
60 void setColor(
const QColor &color );
63 QColor color(
double magnitude )
const;
85 void graduatedColors(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
89 QColor mSingleColor = Qt::black;
93 QLinearGradient makeSimpleLinearGradient(
const QColor &color1,
const QColor &color2 )
const;
96 int itemColorIndexInf(
double value )
const;
98 void graduatedColorsExact(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
99 void graduatedColorsInterpolated(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
100 void graduatedColorsDiscrete(
double value1,
double value2, QList<double> &breakValues, QList<QColor> &breakColors, QList<QLinearGradient> &gradients )
const;
114 double minimumValue()
const;
116 void setMinimumValue(
double minimumValue );
119 double maximumValue()
const;
121 void setMaximumValue(
double maximumValue );
124 double minimumWidth()
const;
126 void setMinimumWidth(
double minimumWidth );
129 double maximumWidth()
const;
131 void setMaximumWidth(
double maximumWidth );
134 bool ignoreOutOfRange()
const;
136 void setIgnoreOutOfRange(
bool ignoreOutOfRange );
139 bool useAbsoluteValue()
const;
141 void setUseAbsoluteValue(
bool useAbsoluteValue );
144 bool isVariableWidth()
const;
146 void setIsVariableWidth(
bool isVariableWidth );
149 double fixedStrokeWidth()
const;
151 void setFixedStrokeWidth(
double fixedWidth );
154 double strokeWidth(
double value )
const;
162 bool mIsWidthVariable =
false;
166 double mMinimumValue = 0;
167 double mMaximumValue = 10;
169 double mMaximumWidth = 3;
170 bool mIgnoreOutOfRange =
false;
171 bool mUseAbsoluteValue =
false;
173 mutable double mLinearCoef = 1;
174 mutable bool mNeedUpdateFormula =
true;
175 void updateLinearFormula()
const;
207 QPolygonF varyingWidthLine(
double value1,
double value2, QPointF point1, QPointF point2,
QgsRenderContext &context )
const;
208 void adjustLine(
const double &value,
const double &value1,
const double &value2,
double &width,
double &adjusting )
const;
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
Class defining color to render mesh datasets.
QgsInterpolatedLineColor()=default
Default constructor.
ColoringMethod
Defines how the color is defined.
Represents a line with width and color varying depending on values.
Represents a width than can vary depending on values.
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.
RenderUnit
Rendering size units.
@ RenderMillimeters
Millimeters.
const double DEFAULT_LINE_WIDTH