1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgslinesymbol.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsLineSymbol : QgsSymbol
{
%Docstring(signature="appended")
A line symbol type, for rendering LineString and MultiLineString
geometries.
%End
%TypeHeaderCode
#include "qgslinesymbol.h"
%End
public:
static QgsLineSymbol *createSimple( const QVariantMap &properties ) /Factory/;
%Docstring
Create a line symbol with one symbol layer: SimpleLine with specified
properties. This is a convenience method for easier creation of line
symbols.
%End
QgsLineSymbol( const QgsSymbolLayerList &layers /Transfer/ = QgsSymbolLayerList() );
%Docstring
Constructor for QgsLineSymbol, with the specified list of initial symbol
``layers``.
Ownership of the ``layers`` are transferred to the symbol.
%End
void setWidth( double width ) const;
%Docstring
Sets the ``width`` for the whole line symbol. Individual symbol layer
sizes will be scaled to maintain their current relative size to the
whole symbol size.
.. seealso:: :py:func:`width`
%End
void setWidthUnit( Qgis::RenderUnit unit ) const;
%Docstring
Sets the width units for the whole symbol (including all symbol layers).
:param unit: size units
.. versionadded:: 3.16
%End
double width() const;
%Docstring
Returns the estimated width for the whole symbol, which is the maximum
width of all marker symbol layers in the symbol.
.. warning::
This returned value is inaccurate if the symbol consists of multiple
symbol layers with different width units. Use the overload accepting a :py:class:`QgsRenderContext`
argument instead for accurate sizes in this case.
.. seealso:: :py:func:`setWidth`
%End
double width( const QgsRenderContext &context ) const;
%Docstring
Returns the symbol width, in painter units. This is the maximum width of
all marker symbol layers in the symbol.
This method returns an accurate width by calculating the actual rendered
width of each symbol layer using the provided render ``context``.
.. seealso:: :py:func:`setWidth`
.. versionadded:: 3.4.5
%End
void setDataDefinedWidth( const QgsProperty &property ) const;
%Docstring
Set data defined width for whole symbol (including all symbol layers).
.. seealso:: :py:func:`dataDefinedWidth`
%End
QgsProperty dataDefinedWidth() const;
%Docstring
Returns data defined width for whole symbol (including all symbol
layers).
:return: data defined width, or invalid property if size is not set at
the line level. Caller takes responsibility for deleting the
returned object.
.. seealso:: :py:func:`setDataDefinedWidth`
%End
void renderPolyline( const QPolygonF &points, const QgsFeature *f, QgsRenderContext &context, int layer = -1, bool selected = false );
%Docstring
Renders the symbol along the line joining ``points``, using the given
render ``context``.
The ``f`` argument is used to pass the feature currently being rendered
(when available).
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.
%End
virtual QgsLineSymbol *clone() const /Factory/;
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/symbology/qgslinesymbol.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|