81 bool mIsAnimated =
false;
82 double mFrameRate = 10;
97 switch ( sipCpp->type() )
102 default: sipType = 0;
break;
195 const int count = sipCpp->symbolLayerCount();
196 if ( a0 < 0 || a0 >= count )
198 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
203 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;
395 void exportImage(
const QString &path,
const QString &format, QSize size );
428 QString
dump()
const;
440 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props )
const;
457 bool usesMapUnits()
const;
514 Qgis::SymbolRenderHints
renderHints()
const {
return mRenderHints; }
522 void setFlags( Qgis::SymbolFlags flags ) { mSymbolFlags = flags; }
530 Qgis::SymbolFlags
flags()
const {
return mSymbolFlags; }
614 void setDataDefinedProperty( Property key, const
QgsProperty &property );
643 bool hasDataDefinedProperties()
const;
654 bool canCauseArtifactsBetweenAdjacentTiles()
const;
721 if ( context.coordinateTransform().isValid() )
723 double x = point.x();
724 double y = point.y();
726 context.coordinateTransform().transformInPlace( x, y, z );
727 pt = QPointF( x, y );
731 pt = point.toQPointF();
733 context.mapToPixel().transformInPlace( pt.rx(), pt.ry() );
748 static QPolygonF _getPolygonRing(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
757 static void _getPolygon( QPolygonF &pts, QVector<QPolygonF> &holes,
QgsRenderContext &context,
const QgsPolygon &polygon,
bool clipToExtent =
true,
bool correctRingOrientation =
false );
789 qreal mOpacity = 1.0;
791 Qgis::SymbolRenderHints mRenderHints;
798 Qgis::SymbolFlags mSymbolFlags =
Qgis::SymbolFlags();
800 bool mClipFeaturesToExtent = true;
801 bool mForceRHR = false;
812 static void initPropertyDefinitions();
821 bool mStarted =
false;
824 std::unique_ptr< QgsSymbolRenderContext > mSymbolRenderContext;
844 static QPolygonF _getPolygonRing2d(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
852 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.
@ FlagIncludeCrosshairsForMarkerSymbols
Include a crosshairs reference image in the background of marker symbol previews.
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.
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.
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.
qreal opacity() const
Returns the opacity 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.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this 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...
RenderUnit
Rendering size units.
Represents a vector layer which manages a vector based data sets.
Handles storage of information regarding WKB types and their properties.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
#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