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 );
225 sipRes = sipCpp->symbolLayerCount();
229 int __bool__()
const;
246 const int count = sipCpp->symbolLayerCount();
247 if ( a0 < -count || a0 >= count )
249 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
254 return sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
258 return sipConvertFromType( sipCpp->symbolLayer( count + a0 ), sipType_QgsSymbolLayer, NULL );
272 void __delitem__(
int index );
274 const int count = sipCpp->symbolLayerCount();
275 if ( a0 >= 0 && a0 < count )
276 sipCpp->deleteSymbolLayer( a0 );
277 else if ( a0 < 0 && a0 >= -count )
278 sipCpp->deleteSymbolLayer( count + a0 );
281 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
307 bool deleteSymbolLayer(
int index );
355 void setColor(
const QColor &color )
const;
365 QColor color()
const;
396 void exportImage(
const QString &path,
const QString &format, QSize size );
425 Q_DECL_DEPRECATED QImage bigSymbolPreviewImage(
QgsExpressionContext *expressionContext =
nullptr,
int flags = static_cast<
int >(
Qgis::SymbolPreviewFlag::FlagIncludeCrosshairsForMarkerSymbols ) )
SIP_DEPRECATED;
430 QString
dump() const;
442 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props ) const;
452 Qgis::RenderUnit outputUnit() const;
459 bool usesMapUnits() const;
469 void setOutputUnit(
Qgis::RenderUnit unit ) const;
497 qreal opacity()
const {
return mOpacity; }
516 Qgis::SymbolRenderHints
renderHints()
const {
return mRenderHints; }
524 void setFlags( Qgis::SymbolFlags flags ) { mSymbolFlags = flags; }
532 Qgis::SymbolFlags
flags()
const {
return mSymbolFlags; }
616 void setDataDefinedProperty( Property key, const
QgsProperty &property );
645 bool hasDataDefinedProperties()
const;
656 bool canCauseArtifactsBetweenAdjacentTiles()
const;
723 if ( context.coordinateTransform().isValid() )
725 double x = point.x();
726 double y = point.y();
728 context.coordinateTransform().transformInPlace( x, y, z );
729 pt = QPointF( x, y );
733 pt = point.toQPointF();
735 context.mapToPixel().transformInPlace( pt.rx(), pt.ry() );
750 static QPolygonF _getPolygonRing(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
759 static void _getPolygon( QPolygonF &pts, QVector<QPolygonF> &holes,
QgsRenderContext &context,
const QgsPolygon &polygon,
bool clipToExtent =
true,
bool correctRingOrientation =
false );
779 void renderUsingLayer(
QgsSymbolLayer *layer,
QgsSymbolRenderContext &context,
Qgis::GeometryType geometryType =
Qgis::GeometryType::Unknown, const QPolygonF *points =
nullptr, const QVector<QPolygonF> *rings =
nullptr );
791 qreal mOpacity = 1.0;
793 Qgis::SymbolRenderHints mRenderHints;
800 Qgis::SymbolFlags mSymbolFlags =
Qgis::SymbolFlags();
802 bool mClipFeaturesToExtent = true;
803 bool mForceRHR = false;
814 static void initPropertyDefinitions();
823 bool mStarted =
false;
826 std::unique_ptr< QgsSymbolRenderContext > mSymbolRenderContext;
846 static QPolygonF _getPolygonRing2d(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
854 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.
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.
SymbolType
Attribute editing capabilities which may be supported by vector data providers.
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 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 bool renderFeature(const QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false) SIP_THROW(QgsCsException)
Render a feature using this renderer in the given context.
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.
void setRenderHints(Qgis::SymbolRenderHints hints)
Sets rendering hint flags for the symbol.
Qgis::SymbolRenderHints renderHints() const
Returns the rendering hint flags for the symbol.
Property
Data definable properties.
@ PropertyOpacity
Opacity.
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_THROW(name,...)
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
QList< QgsSymbolLayer * > QgsSymbolLayerList