2017-06-07 16:07:17 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/core/symbology/qgslinesymbollayer.h *
|
2017-06-07 16:07:17 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
class QgsSimpleLineSymbolLayer : QgsLineSymbolLayer
|
2012-09-24 02:28:15 +02:00
|
|
|
{
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
A simple line symbol layer, which renders lines using a line in a variety of styles (e.g. solid, dotted, dashed).
|
|
|
|
%End
|
2017-06-07 16:07:17 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-07 16:07:17 +02:00
|
|
|
#include "qgslinesymbollayer.h"
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
public:
|
2019-03-20 07:17:54 +10:00
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
QgsSimpleLineSymbolLayer( const QColor &color = DEFAULT_SIMPLELINE_COLOR,
|
|
|
|
double width = DEFAULT_SIMPLELINE_WIDTH,
|
|
|
|
Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_PENSTYLE );
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsSimpleLineSymbolLayer. Creates a simple line
|
|
|
|
symbol in the specified ``color``, ``width`` (in millimeters)
|
|
|
|
and ``penStyle``.
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Creates a new QgsSimpleLineSymbolLayer, using the settings
|
|
|
|
serialized in the ``properties`` map (corresponding to the output from
|
|
|
|
QgsSimpleLineSymbolLayer.properties() ).
|
|
|
|
%End
|
2017-06-07 16:07:17 +02:00
|
|
|
|
2019-03-20 07:17:54 +10:00
|
|
|
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
|
|
|
|
%Docstring
|
|
|
|
Creates a new QgsSimpleLineSymbolLayer from an SLD XML DOM ``element``.
|
|
|
|
%End
|
2017-06-07 16:07:17 +02:00
|
|
|
|
|
|
|
virtual QString layerType() const;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
virtual void startRender( QgsSymbolRenderContext &context );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
virtual void stopRender( QgsSymbolRenderContext &context );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context );
|
|
|
|
|
|
|
|
virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context );
|
|
|
|
|
|
|
|
virtual QgsStringMap properties() const;
|
2014-05-27 23:22:50 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual QgsSimpleLineSymbolLayer *clone() const /Factory/;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
|
|
|
|
|
|
|
|
virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;
|
|
|
|
|
|
|
|
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
|
|
|
|
|
|
|
|
virtual QgsUnitTypes::RenderUnit outputUnit() const;
|
|
|
|
|
|
|
|
virtual void setMapUnitScale( const QgsMapUnitScale &scale );
|
|
|
|
|
|
|
|
virtual QgsMapUnitScale mapUnitScale() const;
|
2014-01-27 09:22:24 +01:00
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
|
2014-01-27 09:22:24 +01:00
|
|
|
|
2019-03-20 07:17:54 +10:00
|
|
|
virtual QVector<qreal> dxfCustomDashPattern( QgsUnitTypes::RenderUnit &unit ) const;
|
|
|
|
|
|
|
|
virtual Qt::PenStyle dxfPenStyle() const;
|
|
|
|
|
|
|
|
virtual double dxfWidth( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
|
|
|
|
|
|
|
|
virtual double dxfOffset( const QgsDxfExport &e, QgsSymbolRenderContext &context ) const;
|
|
|
|
|
|
|
|
virtual QColor dxfColor( QgsSymbolRenderContext &context ) const;
|
2014-01-27 09:22:24 +01:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
Qt::PenStyle penStyle() const;
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Returns the pen style used to render the line (e.g. solid, dashed, etc).
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setPenStyle`
|
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void setPenStyle( Qt::PenStyle style );
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Sets the pen ``style`` used to render the line (e.g. solid, dashed, etc).
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`penStyle`
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
Qt::PenJoinStyle penJoinStyle() const;
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Returns the pen join style used to render the line (e.g. miter, bevel, round, etc).
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setPenJoinStyle`
|
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void setPenJoinStyle( Qt::PenJoinStyle style );
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Sets the pen join ``style`` used to render the line (e.g. miter, bevel, round, etc).
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`penJoinStyle`
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
Qt::PenCapStyle penCapStyle() const;
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Returns the pen cap style used to render the line (e.g. flat, square, round, etc).
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setPenCapStyle`
|
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void setPenCapStyle( Qt::PenCapStyle style );
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Sets the pen cap ``style`` used to render the line (e.g. flat, square, round, etc).
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`penCapStyle`
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
bool useCustomDashPattern() const;
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Returns ``True`` if the line uses a custom dash pattern.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setUseCustomDashPattern`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`customDashPatternUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`customDashVector`
|
|
|
|
%End
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void setUseCustomDashPattern( bool b );
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Sets whether the line uses a custom dash pattern.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`useCustomDashPattern`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setCustomDashPatternUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setCustomDashVector`
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2016-07-17 22:11:17 +10:00
|
|
|
void setCustomDashPatternUnit( QgsUnitTypes::RenderUnit unit );
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
2019-03-20 07:17:54 +10:00
|
|
|
Sets the ``unit`` for lengths used in the custom dash pattern.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`customDashPatternUnit`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2016-07-18 09:42:45 +10:00
|
|
|
|
2016-07-17 22:11:17 +10:00
|
|
|
QgsUnitTypes::RenderUnit customDashPatternUnit() const;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the units for lengths used in the custom dash pattern.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCustomDashPatternUnit`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-05-07 19:02:11 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
const QgsMapUnitScale &customDashPatternMapUnitScale() const;
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Returns the map unit scale for lengths used in the custom dash pattern.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setCustomDashPatternMapUnitScale`
|
|
|
|
%End
|
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
void setCustomDashPatternMapUnitScale( const QgsMapUnitScale &scale );
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Sets the map unit ``scale`` for lengths used in the custom dash pattern.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`customDashPatternMapUnitScale`
|
|
|
|
%End
|
2013-04-19 15:20:44 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
QVector<qreal> customDashVector() const;
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Returns the custom dash vector, which is the pattern of alternating drawn/skipped lengths
|
|
|
|
used while rendering a custom dash pattern.
|
|
|
|
|
|
|
|
Units for the vector are specified by customDashPatternUnit()
|
|
|
|
|
|
|
|
This setting is only used when useCustomDashPattern() returns ``True``.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setCustomDashVector`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`customDashPatternUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`useCustomDashPattern`
|
|
|
|
%End
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setCustomDashVector( const QVector<qreal> &vector );
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
|
|
|
Sets the custom dash ``vector``, which is the pattern of alternating drawn/skipped lengths
|
|
|
|
used while rendering a custom dash pattern.
|
|
|
|
|
|
|
|
Units for the vector are specified by customDashPatternUnit()
|
|
|
|
|
|
|
|
This setting is only used when useCustomDashPattern() returns ``True``.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`customDashVector`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setCustomDashPatternUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setUseCustomDashPattern`
|
|
|
|
%End
|
2014-01-27 09:22:24 +01:00
|
|
|
|
2014-01-20 22:34:22 +11:00
|
|
|
bool drawInsidePolygon() const;
|
2018-11-06 14:15:11 +10:00
|
|
|
%Docstring
|
2019-02-26 19:54:09 +10:00
|
|
|
Returns ``True`` if the line should only be drawn inside polygons, and any portion
|
2018-11-06 14:15:11 +10:00
|
|
|
of the line which falls outside the polygon should be clipped away.
|
|
|
|
|
|
|
|
This setting only has an effect when the line symbol is being
|
|
|
|
used to render polygon rings.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setDrawInsidePolygon`
|
|
|
|
%End
|
|
|
|
|
2014-01-20 22:34:22 +11:00
|
|
|
void setDrawInsidePolygon( bool drawInsidePolygon );
|
2018-11-06 14:15:11 +10:00
|
|
|
%Docstring
|
|
|
|
Sets whether the line should only be drawn inside polygons, and any portion
|
|
|
|
of the line which falls outside the polygon should be clipped away.
|
|
|
|
|
|
|
|
This setting only has an effect when the line symbol is being
|
|
|
|
used to render polygon rings.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`drawInsidePolygon`
|
|
|
|
%End
|
2014-01-27 09:22:24 +01:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
class QgsTemplatedLineSymbolLayerBase : QgsLineSymbolLayer
|
2012-09-24 02:28:15 +02:00
|
|
|
{
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
|
|
|
|
Base class for templated line symbols, e.g. line symbols which draw markers or hash
|
|
|
|
lines at intervals along the line feature.
|
|
|
|
|
|
|
|
.. versionadded:: 3.8
|
2019-03-20 07:17:54 +10:00
|
|
|
%End
|
2017-06-07 16:07:17 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-07 16:07:17 +02:00
|
|
|
#include "qgslinesymbollayer.h"
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
public:
|
2019-03-20 07:17:54 +10:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
enum Placement
|
|
|
|
{
|
|
|
|
Interval,
|
|
|
|
Vertex,
|
|
|
|
LastVertex,
|
|
|
|
FirstVertex,
|
2016-02-14 03:50:23 +01:00
|
|
|
CentralPoint,
|
2019-03-20 07:17:54 +10:00
|
|
|
CurvePoint,
|
2019-08-21 17:44:07 +10:00
|
|
|
SegmentCenter,
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
QgsTemplatedLineSymbolLayerBase( bool rotateSymbol = true,
|
|
|
|
double interval = 3 );
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Constructor for QgsTemplatedLineSymbolLayerBase. Creates a template
|
|
|
|
line placed at the specified ``interval`` (in millimeters).
|
2016-02-14 03:50:23 +01:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
The ``rotateSymbol`` argument specifies whether individual symbols
|
|
|
|
should be rotated to match the line segment alignment.
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
bool rotateSymbols() const;
|
|
|
|
%Docstring
|
|
|
|
Returns ``True`` if the repeating symbols be rotated to match their line segment orientation.
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`setRotateSymbols`
|
|
|
|
%End
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
void setRotateSymbols( bool rotate );
|
|
|
|
%Docstring
|
|
|
|
Sets whether the repeating symbols should be rotated to match their line segment orientation.
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`rotateSymbols`
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
double interval() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the interval between individual symbols. Units are specified through intervalUnits().
|
2017-12-15 08:57:22 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`setInterval`
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`intervalUnit`
|
|
|
|
%End
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
void setInterval( double interval );
|
|
|
|
%Docstring
|
|
|
|
Sets the interval between individual symbols.
|
2012-09-24 02:28:15 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
:param interval: interval size. Units are specified through setIntervalUnit()
|
2017-12-15 08:57:22 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`interval`
|
2012-09-24 02:28:15 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`setIntervalUnit`
|
|
|
|
%End
|
2019-02-04 10:48:41 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
void setIntervalUnit( QgsUnitTypes::RenderUnit unit );
|
|
|
|
%Docstring
|
|
|
|
Sets the units for the interval between symbols.
|
2017-12-15 08:57:22 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
:param unit: interval units
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`intervalUnit`
|
2014-01-27 09:22:24 +01:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`setInterval`
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
QgsUnitTypes::RenderUnit intervalUnit() const;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Returns the units for the interval between symbols.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setIntervalUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`interval`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
void setIntervalMapUnitScale( const QgsMapUnitScale &scale );
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Sets the map unit ``scale`` for the interval between symbols.
|
2019-03-20 07:17:54 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`intervalMapUnitScale`
|
2012-09-24 02:28:15 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`setIntervalUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setInterval`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
const QgsMapUnitScale &intervalMapUnitScale() const;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Returns the map unit scale for the interval between symbols.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`setIntervalMapUnitScale`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`intervalUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
.. seealso:: :py:func:`interval`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2014-01-27 09:22:24 +01:00
|
|
|
Placement placement() const;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
2019-03-20 07:17:54 +10:00
|
|
|
Returns the placement of the symbols.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setPlacement`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2016-02-14 03:50:23 +01:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
void setPlacement( Placement placement );
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
2019-03-20 07:17:54 +10:00
|
|
|
Sets the ``placement`` of the symbols.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`placement`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-05-07 19:02:11 +02:00
|
|
|
|
2014-05-04 20:27:41 +10:00
|
|
|
double offsetAlongLine() const;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Returns the offset along the line for the symbol placement. For Interval placements, this is the distance
|
|
|
|
between the start of the line and the first symbol. For FirstVertex and LastVertex placements, this is the
|
|
|
|
distance between the symbol and the start of the line or the end of the line respectively.
|
2017-12-15 10:36:55 -04:00
|
|
|
This setting has no effect for Vertex or CentralPoint placements.
|
|
|
|
|
|
|
|
:return: The offset along the line. The unit for the offset is retrievable via offsetAlongLineUnit.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetAlongLine`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetAlongLineUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`placement`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-05-04 20:27:41 +10:00
|
|
|
|
|
|
|
void setOffsetAlongLine( double offsetAlongLine );
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Sets the the offset along the line for the symbol placement. For Interval placements, this is the distance
|
|
|
|
between the start of the line and the first symbol. For FirstVertex and LastVertex placements, this is the
|
|
|
|
distance between the symbol and the start of the line or the end of the line respectively.
|
2017-12-15 10:36:55 -04:00
|
|
|
This setting has no effect for Vertex or CentralPoint placements.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param offsetAlongLine: Distance to offset markers along the line. The offset
|
2018-05-24 21:21:14 +10:00
|
|
|
unit is set via setOffsetAlongLineUnit.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetAlongLine`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetAlongLineUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setPlacement`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-05-07 19:02:11 +02:00
|
|
|
|
2016-07-17 22:11:17 +10:00
|
|
|
QgsUnitTypes::RenderUnit offsetAlongLineUnit() const;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Returns the unit used for calculating the offset along line for symbols.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
|
|
|
:return: Offset along line unit type.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetAlongLineUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetAlongLine`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-05-04 20:27:41 +10:00
|
|
|
|
2016-07-17 22:11:17 +10:00
|
|
|
void setOffsetAlongLineUnit( QgsUnitTypes::RenderUnit unit );
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Sets the unit used for calculating the offset along line for symbols.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param unit: Offset along line unit type.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetAlongLineUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetAlongLine`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-05-07 19:02:11 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
const QgsMapUnitScale &offsetAlongLineMapUnitScale() const;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
2019-03-20 07:17:54 +10:00
|
|
|
Returns the map unit scale used for calculating the offset in map units along line for symbols.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2019-03-20 07:17:54 +10:00
|
|
|
.. seealso:: :py:func:`setOffsetAlongLineMapUnitScale`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-04-06 21:14:02 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale &scale );
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
2019-03-20 07:17:54 +10:00
|
|
|
Sets the map unit ``scale`` used for calculating the offset in map units along line for symbols.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2019-03-20 07:17:54 +10:00
|
|
|
.. seealso:: :py:func:`offsetAlongLineMapUnitScale`
|
2019-03-25 17:58:47 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double averageAngleLength() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the length of line over which the line's direction is averaged when
|
|
|
|
calculating individual symbol angles. Longer lengths smooth out angles from jagged lines to a greater extent.
|
|
|
|
|
|
|
|
Units are retrieved through averageAngleUnit()
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleLength`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleMapUnitScale`
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setAverageAngleLength( double length );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``length`` of line over which the line's direction is averaged when
|
|
|
|
calculating individual symbol angles. Longer lengths smooth out angles from jagged lines to a greater extent.
|
|
|
|
|
|
|
|
Units are set through setAverageAngleUnit()
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleLength`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleMapUnitScale`
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setAverageAngleUnit( QgsUnitTypes::RenderUnit unit );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``unit`` for the length over which the line's direction is averaged when
|
|
|
|
calculating individual symbol angles.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleLength`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleMapUnitScale`
|
|
|
|
%End
|
|
|
|
|
|
|
|
QgsUnitTypes::RenderUnit averageAngleUnit() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the unit for the length over which the line's direction is averaged when
|
|
|
|
calculating individual symbol angles.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleLength`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleMapUnitScale`
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setAverageAngleMapUnitScale( const QgsMapUnitScale &scale );
|
|
|
|
%Docstring
|
|
|
|
Sets the map unit ``scale`` for the length over which the line's direction is averaged when
|
|
|
|
calculating individual symbol angles.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleMapUnitScale`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleLength`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleUnit`
|
|
|
|
%End
|
|
|
|
|
|
|
|
const QgsMapUnitScale &averageAngleMapUnitScale() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the map unit scale for the length over which the line's direction is averaged when
|
|
|
|
calculating individual symbol angles.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setAverageAngleMapUnitScale`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleLength`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`averageAngleUnit`
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-01-27 09:22:24 +01:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
virtual void renderPolyline( const QPolygonF &points, QgsSymbolRenderContext &context ) ${SIP_FINAL};
|
|
|
|
|
|
|
|
virtual void renderPolygonStroke( const QPolygonF &points, QList<QPolygonF> *rings, QgsSymbolRenderContext &context ) ${SIP_FINAL};
|
|
|
|
|
|
|
|
virtual QgsUnitTypes::RenderUnit outputUnit() const ${SIP_FINAL};
|
|
|
|
|
|
|
|
virtual void setMapUnitScale( const QgsMapUnitScale &scale ) ${SIP_FINAL};
|
|
|
|
|
|
|
|
virtual QgsMapUnitScale mapUnitScale() const ${SIP_FINAL};
|
|
|
|
|
|
|
|
virtual QgsStringMap properties() const;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void setSymbolLineAngle( double angle ) = 0;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Sets the line ``angle`` modification for the symbol's angle. This angle is added to
|
|
|
|
the symbol's rotation and data defined rotation before rendering the symbol, and
|
|
|
|
is used for orienting symbols to match the line's angle.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
:param angle: Angle in degrees, valid values are between 0 and 360
|
|
|
|
%End
|
2017-12-15 10:36:55 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
virtual double symbolAngle() const = 0;
|
|
|
|
%Docstring
|
|
|
|
Returns the symbol's current angle, in degrees clockwise.
|
|
|
|
%End
|
2017-12-15 10:36:55 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
virtual void setSymbolAngle( double angle ) = 0;
|
|
|
|
%Docstring
|
|
|
|
Sets the symbol's ``angle``, in degrees clockwise.
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2016-07-18 09:42:45 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
virtual void renderSymbol( const QPointF &point, const QgsFeature *feature, QgsRenderContext &context, int layer = -1, bool selected = false ) = 0;
|
2017-06-07 16:07:17 +02:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Renders the templated symbol at the specified ``point``, using the given render ``context``.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
The ``feature`` argument is used to pass the feature currently being rendered (when available).
|
2017-12-15 10:36:55 -04:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
If only a single symbol layer from the symbol should be rendered, it should be specified
|
|
|
|
in the ``layer`` argument. A ``layer`` of -1 indicates that all symbol layers should be
|
|
|
|
rendered.
|
|
|
|
|
|
|
|
If ``selected`` is true then the symbol will be drawn using the "selected feature"
|
|
|
|
style and colors instead of the symbol's normal style.
|
2017-06-07 16:07:17 +02:00
|
|
|
%End
|
2014-05-07 19:02:11 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
void copyTemplateSymbolProperties( QgsTemplatedLineSymbolLayerBase *destLayer ) const;
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Copies all common properties of this layer to another templated symbol layer.
|
|
|
|
%End
|
2019-03-20 07:17:54 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
static void setCommonProperties( QgsTemplatedLineSymbolLayerBase *destLayer, const QgsStringMap &properties );
|
|
|
|
%Docstring
|
|
|
|
Sets all common symbol properties in the ``destLayer``, using the settings
|
|
|
|
serialized in the ``properties`` map.
|
|
|
|
%End
|
2019-03-20 07:17:54 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
};
|
2019-03-20 07:17:54 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
class QgsMarkerLineSymbolLayer : QgsTemplatedLineSymbolLayerBase
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Line symbol layer type which draws repeating marker symbols along a line feature.
|
2019-03-20 07:17:54 +10:00
|
|
|
%End
|
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslinesymbollayer.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
QgsMarkerLineSymbolLayer( bool rotateMarker = DEFAULT_MARKERLINE_ROTATE,
|
|
|
|
double interval = DEFAULT_MARKERLINE_INTERVAL );
|
2019-03-20 07:17:54 +10:00
|
|
|
%Docstring
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
Constructor for QgsMarkerLineSymbolLayer. Creates a marker line
|
|
|
|
with a default marker symbol, placed at the specified ``interval`` (in millimeters).
|
2019-03-20 07:17:54 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
The ``rotateMarker`` argument specifies whether individual marker symbols
|
|
|
|
should be rotated to match the line segment alignment.
|
|
|
|
%End
|
2019-03-20 07:17:54 +10:00
|
|
|
|
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
|
|
|
|
%Docstring
|
|
|
|
Creates a new QgsMarkerLineSymbolLayer, using the settings
|
|
|
|
serialized in the ``properties`` map (corresponding to the output from
|
|
|
|
QgsMarkerLineSymbolLayer.properties() ).
|
2019-03-20 07:17:54 +10:00
|
|
|
%End
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
|
|
|
|
%Docstring
|
|
|
|
Creates a new QgsMarkerLineSymbolLayer from an SLD XML DOM ``element``.
|
|
|
|
%End
|
2017-06-07 16:07:17 +02:00
|
|
|
|
2013-04-19 15:20:44 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
virtual QString layerType() const;
|
2014-05-07 19:02:11 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
virtual void startRender( QgsSymbolRenderContext &context );
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
virtual void stopRender( QgsSymbolRenderContext &context );
|
2017-06-07 16:07:17 +02:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
virtual QgsMarkerLineSymbolLayer *clone() const /Factory/;
|
|
|
|
|
|
|
|
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
|
|
|
|
|
|
|
|
virtual void setColor( const QColor &color );
|
|
|
|
|
|
|
|
virtual QColor color() const;
|
|
|
|
|
|
|
|
virtual QgsSymbol *subSymbol();
|
|
|
|
|
|
|
|
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
|
|
|
|
|
|
|
|
virtual void setWidth( double width );
|
|
|
|
|
|
|
|
virtual double width() const;
|
|
|
|
|
|
|
|
virtual double width( const QgsRenderContext &context ) const;
|
|
|
|
|
|
|
|
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
|
|
|
|
|
|
|
|
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
|
2017-06-07 16:07:17 +02:00
|
|
|
|
|
|
|
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
|
|
|
|
|
2019-01-22 13:29:00 +10:00
|
|
|
virtual bool hasDataDefinedProperties() const;
|
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
virtual void setDataDefinedProperty( QgsSymbolLayer::Property key, const QgsProperty &property );
|
2013-04-19 15:20:44 +02:00
|
|
|
|
2015-05-19 16:54:37 +10:00
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
bool rotateMarker() const /Deprecated/;
|
|
|
|
%Docstring
|
|
|
|
Shall the marker be rotated.
|
|
|
|
|
|
|
|
:return: ``True`` if the marker should be rotated.
|
|
|
|
|
2019-10-15 13:17:38 +02:00
|
|
|
.. deprecated::
|
|
|
|
Use rotateSymbols() instead.
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setRotateMarker( bool rotate ) /Deprecated/;
|
|
|
|
%Docstring
|
|
|
|
Shall the marker be rotated.
|
|
|
|
|
2019-10-15 13:17:38 +02:00
|
|
|
.. deprecated::
|
|
|
|
Use setRotateSymbols() instead.
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
%End
|
2015-11-02 19:32:07 +01:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
protected:
|
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
|
|
|
|
virtual void setSymbolLineAngle( double angle );
|
|
|
|
|
|
|
|
virtual double symbolAngle() const;
|
|
|
|
|
|
|
|
virtual void setSymbolAngle( double angle );
|
|
|
|
|
|
|
|
virtual void renderSymbol( const QPointF &point, const QgsFeature *feature, QgsRenderContext &context, int layer = -1, bool selected = false );
|
2017-02-20 10:37:06 +10:00
|
|
|
|
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
private:
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsMarkerLineSymbolLayer( const QgsMarkerLineSymbolLayer &other );
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|
2017-06-07 16:07:17 +02:00
|
|
|
|
|
|
|
|
[FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.
To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.
This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.
The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-03-19 17:08:15 +10:00
|
|
|
class QgsHashedLineSymbolLayer : QgsTemplatedLineSymbolLayerBase
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
|
|
|
|
Line symbol layer type which draws repeating line sections along a line feature.
|
|
|
|
|
|
|
|
.. versionadded:: 3.8
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslinesymbollayer.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
QgsHashedLineSymbolLayer( bool rotateSymbol = true,
|
|
|
|
double interval = 3 );
|
|
|
|
%Docstring
|
|
|
|
Constructor for QgsHashedLineSymbolLayer. Creates a line
|
|
|
|
with a default hash symbol, placed at the specified ``interval`` (in millimeters).
|
|
|
|
|
|
|
|
The ``rotateSymbol`` argument specifies whether individual hash symbols
|
|
|
|
should be rotated to match the line segment alignment.
|
|
|
|
%End
|
|
|
|
|
|
|
|
static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
|
|
|
|
%Docstring
|
|
|
|
Creates a new QgsHashedLineSymbolLayer, using the settings
|
|
|
|
serialized in the ``properties`` map (corresponding to the output from
|
|
|
|
QgsHashedLineSymbolLayer.properties() ).
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual QString layerType() const;
|
|
|
|
|
|
|
|
virtual void startRender( QgsSymbolRenderContext &context );
|
|
|
|
|
|
|
|
virtual void stopRender( QgsSymbolRenderContext &context );
|
|
|
|
|
|
|
|
virtual QgsStringMap properties() const;
|
|
|
|
|
|
|
|
virtual QgsHashedLineSymbolLayer *clone() const /Factory/;
|
|
|
|
|
|
|
|
virtual void setColor( const QColor &color );
|
|
|
|
|
|
|
|
virtual QColor color() const;
|
|
|
|
|
|
|
|
virtual QgsSymbol *subSymbol();
|
|
|
|
|
|
|
|
virtual bool setSubSymbol( QgsSymbol *symbol /Transfer/ );
|
|
|
|
|
|
|
|
virtual void setWidth( double width );
|
|
|
|
|
|
|
|
virtual double width() const;
|
|
|
|
|
|
|
|
virtual double width( const QgsRenderContext &context ) const;
|
|
|
|
|
|
|
|
virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
|
|
|
|
|
|
|
|
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );
|
|
|
|
|
|
|
|
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
|
|
|
|
|
|
|
|
virtual bool hasDataDefinedProperties() const;
|
|
|
|
|
|
|
|
virtual void setDataDefinedProperty( QgsSymbolLayer::Property key, const QgsProperty &property );
|
|
|
|
|
|
|
|
|
|
|
|
double hashAngle() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the angle to use when drawing the hashed lines sections, in degrees clockwise.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setHashAngle`
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setHashAngle( double angle );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``angle`` to use when drawing the hashed lines sections, in degrees clockwise.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`hashAngle`
|
|
|
|
%End
|
|
|
|
|
|
|
|
double hashLength() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the length of hash symbols. Units are specified through hashLengthUnits().
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setHashLength`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`hashLengthUnit`
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setHashLength( double length );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``length`` of hash symbols. Units are specified through setHashLengthUnit()
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`hashLength`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setHashLengthUnit`
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setHashLengthUnit( QgsUnitTypes::RenderUnit unit );
|
|
|
|
%Docstring
|
|
|
|
Sets the ``unit`` for the length of hash symbols.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`hashLengthUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setHashLength`
|
|
|
|
%End
|
|
|
|
|
|
|
|
QgsUnitTypes::RenderUnit hashLengthUnit() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the units for the length of hash symbols.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setHashLengthUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`hashLength`
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setHashLengthMapUnitScale( const QgsMapUnitScale &scale );
|
|
|
|
%Docstring
|
|
|
|
Sets the map unit ``scale`` for the hash length.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`hashLengthMapUnitScale`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setHashLengthUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setHashLength`
|
|
|
|
%End
|
|
|
|
|
|
|
|
const QgsMapUnitScale &hashLengthMapUnitScale() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the map unit scale for the hash length.
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`setHashLengthMapUnitScale`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`hashLengthUnit`
|
|
|
|
|
|
|
|
.. seealso:: :py:func:`hashLength`
|
|
|
|
%End
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void setSymbolLineAngle( double angle );
|
|
|
|
|
|
|
|
virtual double symbolAngle() const;
|
|
|
|
|
|
|
|
virtual void setSymbolAngle( double angle );
|
|
|
|
|
|
|
|
virtual void renderSymbol( const QPointF &point, const QgsFeature *feature, QgsRenderContext &context, int layer = -1, bool selected = false );
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
QgsHashedLineSymbolLayer( const QgsHashedLineSymbolLayer &other );
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-06-07 16:07:17 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/core/symbology/qgslinesymbollayer.h *
|
2017-06-07 16:07:17 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|