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; }
514 Qgis::SymbolRenderHints
renderHints()
const {
return mRenderHints; }
522 void setFlags( Qgis::SymbolFlags flags ) { mSymbolFlags = flags; }
530 Qgis::SymbolFlags
flags()
const {
return mSymbolFlags; }
612 void setDataDefinedProperty( Property key, const
QgsProperty &property );
640 bool hasDataDefinedProperties()
const;
651 bool canCauseArtifactsBetweenAdjacentTiles()
const;
668 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 );
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 );
779 void renderVertexMarker( QPointF pt,
QgsRenderContext &context,
Qgis::VertexMarkerType currentVertexMarkerType,
double currentVertexMarkerSize );
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 );
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Contains information about the context of a rendering operation.