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;
334 const int count = sipCpp->symbolLayerCount();
335 if ( a0 < 0 || a0 >= count )
337 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
342 sipRes = sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
362 sipRes = sipCpp->symbolLayerCount();
366 int __bool__()
const;
383 const int count = sipCpp->symbolLayerCount();
384 if ( a0 < -count || a0 >= count )
386 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
391 return sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
395 return sipConvertFromType( sipCpp->symbolLayer( count + a0 ), sipType_QgsSymbolLayer, NULL );
409 void __delitem__(
int index );
411 const int count = sipCpp->symbolLayerCount();
412 if ( a0 >= 0 && a0 < count )
413 sipCpp->deleteSymbolLayer( a0 );
414 else if ( a0 < 0 && a0 >= -count )
415 sipCpp->deleteSymbolLayer( count + a0 );
418 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
444 bool deleteSymbolLayer(
int index );
492 void setColor(
const QColor &color )
const;
502 QColor color()
const;
532 void exportImage(
const QString &path,
const QString &format, QSize size );
561 Q_DECL_DEPRECATED QImage bigSymbolPreviewImage(
QgsExpressionContext *expressionContext =
nullptr,
int flags = static_cast<
int >(
Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols ) )
SIP_DEPRECATED;
566 QString dump() const;
578 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props ) const;
588 Qgis::RenderUnit outputUnit() const;
595 bool usesMapUnits() const;
605 void setOutputUnit(
Qgis::RenderUnit unit ) const;
633 qreal opacity()
const {
return mOpacity; }
780 void setDataDefinedProperty( Property key, const
QgsProperty &property );
808 bool hasDataDefinedProperties()
const;
819 bool canCauseArtifactsBetweenAdjacentTiles()
const;
836 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 );
877 double extentBuffer() const;
888 void setExtentBuffer(
double extentBuffer );
897 Qgis::RenderUnit extentBufferSizeUnit()
const {
return mExtentBufferSizeUnit; }
925 double x = point.
x();
926 double y = point.
y();
929 pt = QPointF( x, y );
950 static QPolygonF _getPolygonRing(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
959 static void _getPolygon( QPolygonF &pts, QVector<QPolygonF> &holes,
QgsRenderContext &context,
const QgsPolygon &polygon,
bool clipToExtent =
true,
bool correctRingOrientation =
false );
972 void copyCommonProperties( const
QgsSymbol *other );
986 void renderUsingLayer(
QgsSymbolLayer *layer,
QgsSymbolRenderContext &context,
Qgis::GeometryType geometryType =
Qgis::GeometryType::Unknown, const QPolygonF *points =
nullptr, const QVector<QPolygonF> *rings =
nullptr );
991 void renderVertexMarker( QPointF pt,
QgsRenderContext &context,
Qgis::VertexMarkerType currentVertexMarkerType,
double currentVertexMarkerSize );
996 double mExtentBuffer = 0;
997 Qgis::RenderUnit mExtentBufferSizeUnit =
Qgis::RenderUnit::MapUnits;
1000 qreal mOpacity = 1.0;
1002 Qgis::SymbolRenderHints mRenderHints;
1011 bool mClipFeaturesToExtent = true;
1012 bool mForceRHR = false;
1024 static void initPropertyDefinitions();
1033 bool mStarted =
false;
1036 std::unique_ptr< QgsSymbolRenderContext > mSymbolRenderContext;
1056 static QPolygonF _getPolygonRing2d(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
1064 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.
void transformInPlace(double &x, double &y) const
Transforms map coordinates to device coordinates.
Struct for storing maximum and minimum scales for measurements in map units.
Point geometry type, with support for z-dimension and m-values.
QPointF toQPointF() const
Returns the point as a QPointF.
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.
const QgsMapToPixel & mapToPixel() const
Returns the context's map to pixel transform, which transforms between map coordinates and device coo...
QgsCoordinateTransform coordinateTransform() const
Returns the current coordinate transform for the context.
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.
static QPointF _getPoint(QgsRenderContext &context, const QgsPoint &point)
Creates a point in screen coordinates from a QgsPoint in map coordinates.
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.
void setExtentBufferSizeUnit(Qgis::RenderUnit unit)
Sets the unit used for the extent buffer.
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