19 #include "qgis_core.h"
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 );