QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
QgsInterpolatedLineRenderer Class Reference

Represents a simple line renderer with width and color varying depending on values. More...

#include <qgsinterpolatedlinerenderer.h>

Public Member Functions

QgsInterpolatedLineColor interpolatedColor () const
 Returns the stroke color used to render.
 
QgsInterpolatedLineWidth interpolatedLineWidth () const
 Returns the stroke width used to render.
 
void render (double value1, double value2, const QgsPointXY &point1, const QgsPointXY &point2, QgsRenderContext &context) const
 Renders a line in the context between point1 and point2 with color and width that vary depending on value1 and value2.
 
void render (double valueColor1, double valueColor2, double valueWidth1, double valueWidth2, const QgsPointXY &point1, const QgsPointXY &point2, QgsRenderContext &context) const
 Renders a line in the context between point1 and point2 with color that varies depending on valueColor1 and valueColor2 and and width that varies between valueWidth1 and valueWidth2.
 
void renderInDeviceCoordinates (double valueColor1, double valueColor2, double valueWidth1, double valueWidth2, QPointF point1, QPointF point2, QgsRenderContext &context) const
 Renders a line in the context between point1 and point2 in device (painter) coordinates with color that varies depending on valueColor1 and valueColor2 and and width that varies between valueWidth1 and valueWidth2.
 
void setInterpolatedColor (const QgsInterpolatedLineColor &strokeColoring)
 Sets the stroke color used to render.
 
void setInterpolatedWidth (const QgsInterpolatedLineWidth &strokeWidth)
 Sets the stroke width used to render.
 
void setSelected (bool selected)
 Sets if the rendering must be done as the element is selected.
 
void setWidthUnit (Qgis::RenderUnit strokeWidthUnit)
 Sets the unit of the stroke width.
 
Qgis::RenderUnit widthUnit () const
 Returns the unit of the stroke width.
 

Friends

class QgsInterpolatedLineSymbolLayer
 

Detailed Description

Represents a simple line renderer with width and color varying depending on values.

Since
QGIS 3.14

Definition at line 198 of file qgsinterpolatedlinerenderer.h.

Member Function Documentation

◆ interpolatedColor()

QgsInterpolatedLineColor QgsInterpolatedLineRenderer::interpolatedColor ( ) const

Returns the stroke color used to render.

Since
QGIS 3.20

Definition at line 41 of file qgsinterpolatedlinerenderer.cpp.

◆ interpolatedLineWidth()

QgsInterpolatedLineWidth QgsInterpolatedLineRenderer::interpolatedLineWidth ( ) const

Returns the stroke width used to render.

Since
QGIS 3.20

Definition at line 31 of file qgsinterpolatedlinerenderer.cpp.

◆ render() [1/2]

void QgsInterpolatedLineRenderer::render ( double  value1,
double  value2,
const QgsPointXY point1,
const QgsPointXY point2,
QgsRenderContext context 
) const

Renders a line in the context between point1 and point2 with color and width that vary depending on value1 and value2.

This method assumes that point1 and point2 are in map units. See renderInDeviceCoordinates() for an equivalent method which renders lines in painter coordinates.

Definition at line 228 of file qgsinterpolatedlinerenderer.cpp.

◆ render() [2/2]

void QgsInterpolatedLineRenderer::render ( double  valueColor1,
double  valueColor2,
double  valueWidth1,
double  valueWidth2,
const QgsPointXY point1,
const QgsPointXY point2,
QgsRenderContext context 
) const

Renders a line in the context between point1 and point2 with color that varies depending on valueColor1 and valueColor2 and and width that varies between valueWidth1 and valueWidth2.

This method assumes that point1 and point2 are in map units. See renderInDeviceCoordinates() for an equivalent method which renders lines in painter coordinates.

Since
QGIS 3.20

Definition at line 247 of file qgsinterpolatedlinerenderer.cpp.

◆ renderInDeviceCoordinates()

void QgsInterpolatedLineRenderer::renderInDeviceCoordinates ( double  valueColor1,
double  valueColor2,
double  valueWidth1,
double  valueWidth2,
QPointF  point1,
QPointF  point2,
QgsRenderContext context 
) const

Renders a line in the context between point1 and point2 in device (painter) coordinates with color that varies depending on valueColor1 and valueColor2 and and width that varies between valueWidth1 and valueWidth2.

Since
QGIS 3.22

Definition at line 56 of file qgsinterpolatedlinerenderer.cpp.

◆ setInterpolatedColor()

void QgsInterpolatedLineRenderer::setInterpolatedColor ( const QgsInterpolatedLineColor strokeColoring)

Sets the stroke color used to render.

Definition at line 36 of file qgsinterpolatedlinerenderer.cpp.

◆ setInterpolatedWidth()

void QgsInterpolatedLineRenderer::setInterpolatedWidth ( const QgsInterpolatedLineWidth strokeWidth)

Sets the stroke width used to render.

Definition at line 26 of file qgsinterpolatedlinerenderer.cpp.

◆ setSelected()

void QgsInterpolatedLineRenderer::setSelected ( bool  selected)

Sets if the rendering must be done as the element is selected.

Since
QGIS 3.20

Definition at line 267 of file qgsinterpolatedlinerenderer.cpp.

◆ setWidthUnit()

void QgsInterpolatedLineRenderer::setWidthUnit ( Qgis::RenderUnit  strokeWidthUnit)

Sets the unit of the stroke width.

Definition at line 46 of file qgsinterpolatedlinerenderer.cpp.

◆ widthUnit()

Qgis::RenderUnit QgsInterpolatedLineRenderer::widthUnit ( ) const

Returns the unit of the stroke width.

Since
QGIS 3.20

Definition at line 51 of file qgsinterpolatedlinerenderer.cpp.

Friends And Related Symbol Documentation

◆ QgsInterpolatedLineSymbolLayer

friend class QgsInterpolatedLineSymbolLayer
friend

Definition at line 273 of file qgsinterpolatedlinerenderer.h.


The documentation for this class was generated from the following files: