82 bool mIsAnimated =
false;
83 double mFrameRate = 10;
98 switch ( sipCpp->type() )
103 default: sipType = 0;
break;
196 const int count = sipCpp->symbolLayerCount();
197 if ( a0 < 0 || a0 >= count )
199 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
204 sipRes = sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
224 sipRes = sipCpp->symbolLayerCount();
228 int __bool__()
const;
245 const int count = sipCpp->symbolLayerCount();
246 if ( a0 < -count || a0 >= count )
248 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
253 return sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
257 return sipConvertFromType( sipCpp->symbolLayer( count + a0 ), sipType_QgsSymbolLayer, NULL );
271 void __delitem__(
int index );
273 const int count = sipCpp->symbolLayerCount();
274 if ( a0 >= 0 && a0 < count )
275 sipCpp->deleteSymbolLayer( a0 );
276 else if ( a0 < 0 && a0 >= -count )
277 sipCpp->deleteSymbolLayer( count + a0 );
280 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
306 bool deleteSymbolLayer(
int index );
354 void setColor(
const QColor &color )
const;
364 QColor color()
const;
394 void exportImage(
const QString &path,
const QString &format, QSize size );
423 Q_DECL_DEPRECATED QImage bigSymbolPreviewImage(
QgsExpressionContext *expressionContext =
nullptr,
int flags = static_cast<
int >(
Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols ) )
SIP_DEPRECATED;
428 QString
dump() const;
440 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props ) const;
450 Qgis::RenderUnit outputUnit() const;
457 bool usesMapUnits() const;
467 void setOutputUnit(
Qgis::RenderUnit unit ) const;
495 qreal opacity()
const {
return mOpacity; }
612 void setDataDefinedProperty( Property key, const
QgsProperty &property );
640 bool hasDataDefinedProperties()
const;
651 bool canCauseArtifactsBetweenAdjacentTiles()
const;
718 if ( context.coordinateTransform().isValid() )
720 double x = point.x();
721 double y = point.y();
723 context.coordinateTransform().transformInPlace( x, y, z );
724 pt = QPointF( x, y );
728 pt = point.toQPointF();
730 context.mapToPixel().transformInPlace( pt.rx(), pt.ry() );
745 static QPolygonF _getPolygonRing(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
754 static void _getPolygon( QPolygonF &pts, QVector<QPolygonF> &holes,
QgsRenderContext &context,
const QgsPolygon &polygon,
bool clipToExtent =
true,
bool correctRingOrientation =
false );
774 void renderUsingLayer(
QgsSymbolLayer *layer,
QgsSymbolRenderContext &context,
Qgis::GeometryType geometryType =
Qgis::GeometryType::Unknown, const QPolygonF *points =
nullptr, const QVector<QPolygonF> *rings =
nullptr );
785 qreal mOpacity = 1.0;
787 Qgis::SymbolRenderHints mRenderHints;
794 Qgis::SymbolFlags mSymbolFlags =
Qgis::SymbolFlags();
796 bool mClipFeaturesToExtent = true;
797 bool mForceRHR = false;
808 static void initPropertyDefinitions();
817 bool mStarted =
false;
820 std::unique_ptr< QgsSymbolRenderContext > mSymbolRenderContext;
840 static QPolygonF _getPolygonRing2d(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
848 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.
@ 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...
static QPointF _getPoint(QgsRenderContext &context, const QgsPoint &point)
Creates a point in screen coordinates from a wkb string in map coordinates.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
virtual void toSld(QDomDocument &doc, QDomElement &element, const QVariantMap &props=QVariantMap()) const
used from subclasses to create SLD Rule elements following SLD v1.1 specs
virtual bool renderFeature(const QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false)
Render a feature using this renderer in the given context.
virtual QString dump() const
Returns debug information about this renderer.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const =0
Returns a list of attributes required by this renderer.
void renderVertexMarker(QPointF pt, QgsRenderContext &context)
render editing vertex marker at specified point
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started.
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Container of fields for a vector layer.
Represents a patch shape for use in map legends.
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.
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).
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.
Qgis::SymbolRenderHints renderHints() const
Returns the rendering hint flags for the symbol.
Qgis::SymbolFlags flags() const
Returns 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