19 #include "qgis_core.h"
42 switch ( sipCpp->type() )
47 default: sipType = 0;
break;
140 const int count = sipCpp->symbolLayerCount();
141 if ( a0 < 0 || a0 >= count )
143 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
148 sipRes = sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
169 sipRes = sipCpp->symbolLayerCount();
173 int __bool__()
const;
190 const int count = sipCpp->symbolLayerCount();
191 if ( a0 < -count || a0 >= count )
193 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
198 return sipConvertFromType( sipCpp->symbolLayer( a0 ), sipType_QgsSymbolLayer, NULL );
202 return sipConvertFromType( sipCpp->symbolLayer( count + a0 ), sipType_QgsSymbolLayer, NULL );
216 void __delitem__(
int index );
218 const int count = sipCpp->symbolLayerCount();
219 if ( a0 >= 0 && a0 < count )
220 sipCpp->deleteSymbolLayer( a0 );
221 else if ( a0 < 0 && a0 >= -count )
222 sipCpp->deleteSymbolLayer( count + a0 );
225 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
251 bool deleteSymbolLayer(
int index );
299 void setColor(
const QColor &color );
309 QColor color()
const;
340 void exportImage(
const QString &path,
const QString &format, QSize size );
373 QString
dump()
const;
385 void toSld( QDomDocument &doc, QDomElement &element, QVariantMap props )
const;
402 bool usesMapUnits()
const;
459 Qgis::SymbolRenderHints
renderHints()
const {
return mRenderHints; }
467 void setFlags( Qgis::SymbolFlags flags ) { mSymbolFlags = flags; }
475 Qgis::SymbolFlags
flags()
const {
return mSymbolFlags; }
535 void setDataDefinedProperty( Property key,
const QgsProperty &property );
564 bool hasDataDefinedProperties()
const;
575 bool canCauseArtifactsBetweenAdjacentTiles()
const;
642 if ( context.coordinateTransform().isValid() )
644 double x = point.x();
645 double y = point.y();
647 context.coordinateTransform().transformInPlace( x, y, z );
648 pt = QPointF( x, y );
652 pt = point.toQPointF();
654 context.mapToPixel().transformInPlace( pt.rx(), pt.ry() );
669 static QPolygonF _getPolygonRing(
QgsRenderContext &context,
const QgsCurve &curve,
bool clipToExtent,
bool isExteriorRing =
false,
bool correctRingOrientation =
false );
678 static void _getPolygon( QPolygonF &pts, QVector<QPolygonF> &holes,
QgsRenderContext &context,
const QgsPolygon &polygon,
bool clipToExtent =
true,
bool correctRingOrientation =
false );
707 qreal mOpacity = 1.0;
709 Qgis::SymbolRenderHints mRenderHints;
716 Qgis::SymbolFlags mSymbolFlags =
Qgis::SymbolFlags();
718 bool mClipFeaturesToExtent = true;
719 bool mForceRHR = false;
728 static void initPropertyDefinitions();
737 bool mStarted =
false;
740 std::unique_ptr< QgsSymbolRenderContext > mSymbolRenderContext;
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.
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.
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the symbol's property collection, used for data defined overrides.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the symbol's property collection, used for data defined overrides.
QgsSymbolLayerList symbolLayers()
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.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.
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.
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)
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
QList< QgsSymbolLayer * > QgsSymbolLayerList