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;
673 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 );
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 );
785 void renderVertexMarker( QPointF pt,
QgsRenderContext &context,
Qgis::VertexMarkerType currentVertexMarkerType,
double currentVertexMarkerSize );
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 );
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Contains information about the context of a rendering operation.