82 bool mIsAnimated =
false;
83 double mFrameRate = 10;
123 double size()
const {
return mSize; }
174 Qt::PenJoinStyle
joinStyle()
const {
return mJoinStyle; }
215 bool mEnabled =
false;
219 Qt::PenJoinStyle mJoinStyle = Qt::RoundJoin;
220 std::unique_ptr< QgsFillSymbol > mFillSymbol;
235 switch ( sipCpp->type() )
240 default: sipType = 0;
break;
333 const int count = sipCpp->symbolLayerCount();
334 if ( a0 < 0 || a0 >= count )
336 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
341 sipRes = sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
361 sipRes = sipCpp->symbolLayerCount();
365 int __bool__()
const;
382 const int count = sipCpp->symbolLayerCount();
383 if ( a0 < -count || a0 >= count )
385 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
390 return sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
394 return sipConvertFromType( sipCpp->symbolLayer( count + a0 ), sipType_QgsSymbolLayer, NULL );
408 void __delitem__(
int index );
410 const int count = sipCpp->symbolLayerCount();
411 if ( a0 >= 0 && a0 < count )
412 sipCpp->deleteSymbolLayer( a0 );
413 else if ( a0 < 0 && a0 >= -count )
414 sipCpp->deleteSymbolLayer( count + a0 );
417 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
443 bool deleteSymbolLayer(
int index );
491 void setColor(
const QColor &color )
const;
501 QColor color()
const;
531 void exportImage(
const QString &path,
const QString &format, QSize size );
560 Q_DECL_DEPRECATED QImage bigSymbolPreviewImage(
QgsExpressionContext *expressionContext =
nullptr,
int flags = static_cast<
int >(
Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols ) )
SIP_DEPRECATED;
565 QString dump() const;
577 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props ) const;
587 Qgis::RenderUnit outputUnit() const;
594 bool usesMapUnits() const;
604 void setOutputUnit(
Qgis::RenderUnit unit ) const;
632 qreal opacity()
const {
return mOpacity; }
779 void setDataDefinedProperty( Property key, const
QgsProperty &property );
807 bool hasDataDefinedProperties()
const;
818 bool canCauseArtifactsBetweenAdjacentTiles()
const;
835 void renderFeature( const
QgsFeature &feature,
QgsRenderContext &context,
int layer = -1,
bool selected = false,
bool drawVertexMarker = false,
Qgis::VertexMarkerType currentVertexMarkerType =
Qgis::VertexMarkerType::SemiTransparentCircle,
double currentVertexMarkerSize = 0.0 )
SIP_THROW(
QgsCsException );
885 if ( context.coordinateTransform().isValid() )
887 double x = point.x();
888 double y = point.y();
890 context.coordinateTransform().transformInPlace( x, y, z );
891 pt = QPointF( x, y );
895 pt = point.toQPointF();
897 context.mapToPixel().transformInPlace( pt.rx(), pt.ry() );
912 static QPolygonF _getPolygonRing(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
921 static void _getPolygon( QPolygonF &pts, QVector<QPolygonF> &holes,
QgsRenderContext &context,
const QgsPolygon &polygon,
bool clipToExtent =
true,
bool correctRingOrientation =
false );
934 void copyCommonProperties( const
QgsSymbol *other );
948 void renderUsingLayer(
QgsSymbolLayer *layer,
QgsSymbolRenderContext &context,
Qgis::GeometryType geometryType =
Qgis::GeometryType::Unknown, const QPolygonF *points =
nullptr, const QVector<QPolygonF> *rings =
nullptr );
953 void renderVertexMarker( QPointF pt,
QgsRenderContext &context,
Qgis::VertexMarkerType currentVertexMarkerType,
double currentVertexMarkerSize );
959 qreal mOpacity = 1.0;
961 Qgis::SymbolRenderHints mRenderHints;
968 Qgis::SymbolFlags mSymbolFlags =
Qgis::SymbolFlags();
970 bool mClipFeaturesToExtent = true;
971 bool mForceRHR = false;
983 static void initPropertyDefinitions();
992 bool mStarted =
false;
995 std::unique_ptr< QgsSymbolRenderContext > mSymbolRenderContext;
1015 static QPolygonF _getPolygonRing2d(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
1023 static QPolygonF _getPolygonRing3d(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
The Qgis class provides global constants for use throughout the application.
QFlags< SymbolPreviewFlag > SymbolPreviewFlags
Symbol preview flags.
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
RenderUnit
Rendering size units.
@ Millimeters
Millimeters.
@ FlagIncludeCrosshairsForMarkerSymbols
Include a crosshairs reference image in the background of marker symbol previews.
QFlags< SymbolRenderHint > SymbolRenderHints
Symbol render hints.
QFlags< SymbolFlag > SymbolFlags
Symbol flags.
Custom exception class for Coordinate Reference System related exceptions.
Abstract base class for curved geometry type.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract base class for all 2D vector feature renderers.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Container of fields for a vector layer.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
Represents a patch shape for use in map legends.
Abstract base class for line symbol layers.
Struct for storing maximum and minimum scales for measurements in map units.
Point geometry type, with support for z-dimension and m-values.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
A store for object properties.
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
Stores properties relating to a screen.
Contains settings relating to symbol animation.
bool isAnimated() const
Returns true if the symbol is animated.
void setIsAnimated(bool animated)
Sets whether the symbol is animated.
void setFrameRate(double rate)
Sets the symbol animation frame rate (in frames per second).
double frameRate() const
Returns the symbol animation frame rate (in frames per second).
Contains settings relating to symbol buffers, which draw a "halo" effect around the symbol.
void setEnabled(bool enabled)
Sets whether the symbol buffer will be drawn.
void setSizeMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale object for the buffer size.
bool enabled() const
Returns whether the buffer is enabled.
~QgsSymbolBufferSettings()
QgsMapUnitScale sizeMapUnitScale() const
Returns the map unit scale object for the buffer size.
void setSize(double size)
Sets the size of the buffer.
void setJoinStyle(Qt::PenJoinStyle style)
Sets the join style used for drawing the buffer.
void setSizeUnit(Qgis::RenderUnit unit)
Sets the unit used for the buffer size.
Qt::PenJoinStyle joinStyle() const
Returns the buffer join style.
Qgis::RenderUnit sizeUnit() const
Returns the units for the buffer size.
double size() const
Returns the size of the buffer.
Abstract base class for all rendered symbols.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the symbol's property collection, used for data defined overrides.
Property
Data definable properties.
void setRenderHints(Qgis::SymbolRenderHints hints)
Sets rendering hint flags for the symbol.
bool clipFeaturesToExtent() const
Returns whether features drawn by the symbol will be clipped to the render context's extent.
void setFlags(Qgis::SymbolFlags flags)
Sets flags for the symbol.
QgsSymbolLayerList symbolLayers() const
Returns the list of symbol layers contained in the symbol.
void setOpacity(qreal opacity)
Sets the opacity for the symbol.
int symbolLayerCount() const
Returns the total number of symbol layers contained in the symbol.
Qgis::SymbolType type() const
Returns the symbol's type.
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the symbol's property collection, used for data defined overrides.
bool forceRHR() const
Returns true if polygon features drawn by the symbol will be reoriented to follow the standard right-...
void setClipFeaturesToExtent(bool clipFeaturesToExtent)
Sets whether features drawn by the symbol should be clipped to the render context's extent.
void setForceRHR(bool force)
Sets whether polygon features drawn by the symbol should be reoriented to follow the standard right-h...
Represents a vector layer which manages a vector based data sets.
#define SIP_TYPEHINT(type)
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
#define SIP_THROW(name,...)
#define SIP_MONKEYPATCH_COMPAT_NAME(FORMERNAME)
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
QList< QgsSymbolLayer * > QgsSymbolLayerList