Skip to content

Commit 55fc40d

Browse files
committed
Remove more deprecated methods from symbology
1 parent 7c1fc8e commit 55fc40d

12 files changed

+38
-161
lines changed

doc/api_break.dox

+14
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,20 @@ be returned instead of a null pointer if no transformation is required.</li>
899899
<li>QgsRubberBand( QgsMapCanvas* mapCanvas, bool isPolygon ) constructor and reset( bool isPolygon) have been removed, use constructor and function with Qgis::GeometryType as argument instead.</li>
900900
</ul>
901901

902+
\subsection qgis_api_break_3_0_QgsRuleBasedRenderer QgsRuleBasedRenderer
903+
904+
<ul>
905+
<li>QgsRuleBasedRenderer.Rule checkState() and setCheckState() were removed. Use active() and setActive() instead.</li>
906+
<li>startRender( QgsRenderContext& context, const QgsFields& fields ) was removed. Use startRender( QgsRenderContext& context, const QgsFields& fields, QString& filter ) instead.</li>
907+
</ul>
908+
909+
\subsection qgis_api_break_3_0_QgsSimpleMarkerSymbolLayer QgsSimpleMarkerSymbolLayer
910+
911+
<ul>
912+
<li>The constructor variant with a string for the shape name has been removed. Use the variant which accepts a QgsSimpleMarkerSymbolLayerBase.Shape enum instead.</li>
913+
<li>name() and setName() have been removed. Use shape() and setShape() instead.</li>
914+
<li>prepareShape() and preparePath() were removed. Calling these methods manually should no longer be required.</li>
915+
</ul>
902916

903917
\subsection qgis_api_break_3_0_QgsSnapper QgsSnapper
904918

python/core/symbology-ng/qgsmarkersymbollayer.sip

-35
Original file line numberDiff line numberDiff line change
@@ -148,28 +148,6 @@ class QgsSimpleMarkerSymbolLayer : QgsSimpleMarkerSymbolLayerBase
148148

149149
public:
150150

151-
/** Constructor for QgsSimpleMarkerSymbolLayer.
152-
* @param name symbol name, should be one of "square", "rectangle", "diamond",
153-
* "pentagon", "hexagon", "triangle", "equilateral_triangle", "star", "arrow",
154-
* "circle", "cross", "cross_fill", "cross2", "line", "x", "arrowhead", "filled_arrowhead",
155-
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
156-
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"
157-
* @param color fill color for symbol
158-
* @param borderColor border color for symbol
159-
* @param size symbol size (in mm)
160-
* @param angle symbol rotation angle
161-
* @param scaleMethod scaling method for data defined scaling
162-
* @param penJoinStyle join style for outline pen
163-
* @deprecated use variant which accepts QgsSimpleMarkerSymbolLayerBase::Shape instead
164-
*/
165-
QgsSimpleMarkerSymbolLayer( const QString& name,
166-
const QColor& color = DEFAULT_SIMPLEMARKER_COLOR,
167-
const QColor& borderColor = DEFAULT_SIMPLEMARKER_BORDERCOLOR,
168-
double size = DEFAULT_SIMPLEMARKER_SIZE,
169-
double angle = DEFAULT_SIMPLEMARKER_ANGLE,
170-
QgsSymbol::ScaleMethod scaleMethod = DEFAULT_SCALE_METHOD,
171-
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEMARKER_JOINSTYLE ) /Deprecated/;
172-
173151
/** Constructor for QgsSimpleMarkerSymbolLayer.
174152
* @param shape symbol shape
175153
* @param size symbol size (in mm)
@@ -225,12 +203,6 @@ class QgsSimpleMarkerSymbolLayer : QgsSimpleMarkerSymbolLayerBase
225203

226204
// new methods
227205

228-
//! @deprecated use shape() instead
229-
QString name() const /Deprecated/;
230-
231-
//! @deprecated use setShape() instead
232-
void setName( const QString& name ) /Deprecated/;
233-
234206
/** Returns the marker's border color.
235207
* @see setBorderColor()
236208
* @see outlineStyle()
@@ -334,13 +306,6 @@ class QgsSimpleMarkerSymbolLayer : QgsSimpleMarkerSymbolLayerBase
334306
*/
335307
void drawMarker( QPainter* p, QgsSymbolRenderContext& context );
336308

337-
//! @deprecated will be removed in QGIS 3.0
338-
bool prepareShape( const QString& name = QString() ) /Deprecated/;
339-
//! @deprecated will be removed in QGIS 3.0
340-
bool prepareShape( const QString& name, QPolygonF &polygon ) const /Deprecated/;
341-
//! @deprecated will be removed in QGIS 3.0
342-
bool preparePath( QString name = QString() ) /Deprecated/;
343-
344309
/** Prepares cache image
345310
* @returns true in case of success, false if cache image size too large
346311
*/

python/core/symbology-ng/qgspointdisplacementrenderer.sip

-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ class QgsPointDisplacementRenderer : QgsFeatureRenderer
7777
virtual bool legendSymbolItemChecked( const QString& key );
7878
virtual void checkLegendSymbolItem( const QString& key, bool state = true );
7979

80-
//! not available in python bindings
81-
//! @deprecated since 2.4
82-
// void setDisplacementGroups( const QList<QMap<QgsFeatureId, QgsFeature> >& list );
83-
8480
void setLabelFont( const QFont& f );
8581
QFont labelFont() const;
8682

python/core/symbology-ng/qgsrulebasedrenderer.sip

-13
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,6 @@ class QgsRuleBasedRenderer : QgsFeatureRenderer
138138
*/
139139
QString description() const;
140140

141-
//! @note added in 2.6
142-
//! @deprecated use active instead
143-
bool checkState() const /Deprecated/;
144-
145141
/**
146142
* Returns if this rule is active
147143
*
@@ -190,10 +186,6 @@ class QgsRuleBasedRenderer : QgsFeatureRenderer
190186
*/
191187
void setDescription( const QString& description );
192188

193-
//! @note added in 2.6
194-
//! @deprecated use setActive instead
195-
void setCheckState( bool state ) /Deprecated/;
196-
197189
/**
198190
* Sets if this rule is active
199191
* @param state Determines if the rule should be activated or deactivated
@@ -208,11 +200,6 @@ class QgsRuleBasedRenderer : QgsFeatureRenderer
208200

209201
QDomElement save( QDomDocument& doc, QgsSymbolMap& symbolMap );
210202

211-
/** Prepare the rule for rendering and its children (build active children array)
212-
* @deprecated use startRender( QgsRenderContext& context, const QgsFields& fields, QString& filter ) instead
213-
*/
214-
bool startRender( QgsRenderContext& context, const QgsFields& fields ) /Deprecated/;
215-
216203
//! prepare the rule for rendering and its children (build active children array)
217204
bool startRender( QgsRenderContext& context, const QgsFields& fields, QString& filter );
218205

src/core/symbology-ng/qgsmarkersymbollayer.cpp

-29
Original file line numberDiff line numberDiff line change
@@ -682,20 +682,6 @@ void QgsSimpleMarkerSymbolLayerBase::calculateOffsetAndRotation( QgsSymbolRender
682682
// QgsSimpleMarkerSymbolLayer
683683
//
684684

685-
QgsSimpleMarkerSymbolLayer::QgsSimpleMarkerSymbolLayer( const QString& name, const QColor& color, const QColor& borderColor, double size, double angle, QgsSymbol::ScaleMethod scaleMethod,
686-
Qt::PenJoinStyle penJoinStyle )
687-
: QgsSimpleMarkerSymbolLayerBase( decodeShape( name ), size, angle, scaleMethod )
688-
, mBorderColor( borderColor )
689-
, mOutlineStyle( Qt::SolidLine )
690-
, mOutlineWidth( 0 )
691-
, mOutlineWidthUnit( QgsUnitTypes::RenderMillimeters )
692-
, mPenJoinStyle( penJoinStyle )
693-
, mName( name )
694-
, mUsingCache( false )
695-
{
696-
mColor = color;
697-
}
698-
699685
QgsSimpleMarkerSymbolLayer::QgsSimpleMarkerSymbolLayer( QgsSimpleMarkerSymbolLayerBase::Shape shape, double size, double angle, QgsSymbol::ScaleMethod scaleMethod, const QColor& color, const QColor& borderColor, Qt::PenJoinStyle penJoinStyle )
700686
: QgsSimpleMarkerSymbolLayerBase( shape, size, angle, scaleMethod )
701687
, mBorderColor( borderColor )
@@ -944,21 +930,6 @@ bool QgsSimpleMarkerSymbolLayer::prepareCache( QgsSymbolRenderContext& context )
944930
return true;
945931
}
946932

947-
bool QgsSimpleMarkerSymbolLayer::prepareShape( const QString& name )
948-
{
949-
return shapeToPolygon( name.isNull() ? mShape : decodeShape( name ), mPolygon );
950-
}
951-
952-
bool QgsSimpleMarkerSymbolLayer::prepareShape( const QString& name, QPolygonF &polygon ) const
953-
{
954-
return shapeToPolygon( decodeShape( name ), polygon );
955-
}
956-
957-
bool QgsSimpleMarkerSymbolLayer::preparePath( QString name )
958-
{
959-
return prepareMarkerPath( decodeShape( name ) );
960-
}
961-
962933
void QgsSimpleMarkerSymbolLayer::draw( QgsSymbolRenderContext &context, QgsSimpleMarkerSymbolLayerBase::Shape shape, const QPolygonF &polygon, const QPainterPath &path )
963934
{
964935
//making changes here? Don't forget to also update ::bounds if the changes affect the bounding box

src/core/symbology-ng/qgsmarkersymbollayer.h

-35
Original file line numberDiff line numberDiff line change
@@ -186,28 +186,6 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayer : public QgsSimpleMarkerSymbolLayer
186186
{
187187
public:
188188

189-
/** Constructor for QgsSimpleMarkerSymbolLayer.
190-
* @param name symbol name, should be one of "square", "rectangle", "diamond",
191-
* "pentagon", "hexagon", "triangle", "equilateral_triangle", "star", "arrow",
192-
* "circle", "cross", "cross_fill", "cross2", "line", "x", "arrowhead", "filled_arrowhead",
193-
* "semi_circle", "third_circle", "quarter_circle", "quarter_square", "half_square",
194-
* "diagonal_half_square", "right_half_triangle", "left_half_triangle"
195-
* @param color fill color for symbol
196-
* @param borderColor border color for symbol
197-
* @param size symbol size (in mm)
198-
* @param angle symbol rotation angle
199-
* @param scaleMethod scaling method for data defined scaling
200-
* @param penJoinStyle join style for outline pen
201-
* @deprecated use variant which accepts QgsSimpleMarkerSymbolLayerBase::Shape instead
202-
*/
203-
Q_DECL_DEPRECATED QgsSimpleMarkerSymbolLayer( const QString& name,
204-
const QColor& color = DEFAULT_SIMPLEMARKER_COLOR,
205-
const QColor& borderColor = DEFAULT_SIMPLEMARKER_BORDERCOLOR,
206-
double size = DEFAULT_SIMPLEMARKER_SIZE,
207-
double angle = DEFAULT_SIMPLEMARKER_ANGLE,
208-
QgsSymbol::ScaleMethod scaleMethod = DEFAULT_SCALE_METHOD,
209-
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEMARKER_JOINSTYLE );
210-
211189
/** Constructor for QgsSimpleMarkerSymbolLayer.
212190
* @param shape symbol shape
213191
* @param size symbol size (in mm)
@@ -263,12 +241,6 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayer : public QgsSimpleMarkerSymbolLayer
263241

264242
// new methods
265243

266-
//! @deprecated use shape() instead
267-
Q_DECL_DEPRECATED QString name() const { return encodeShape( mShape ); }
268-
269-
//! @deprecated use setShape() instead
270-
Q_DECL_DEPRECATED void setName( const QString& name ) { mName = name; mShape = decodeShape( name ); }
271-
272244
/** Returns the marker's border color.
273245
* @see setBorderColor()
274246
* @see outlineStyle()
@@ -372,13 +344,6 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayer : public QgsSimpleMarkerSymbolLayer
372344
*/
373345
void drawMarker( QPainter* p, QgsSymbolRenderContext& context );
374346

375-
//! @deprecated will be removed in QGIS 3.0
376-
Q_DECL_DEPRECATED bool prepareShape( const QString& name = QString() );
377-
//! @deprecated will be removed in QGIS 3.0
378-
Q_DECL_DEPRECATED bool prepareShape( const QString& name, QPolygonF &polygon ) const;
379-
//! @deprecated will be removed in QGIS 3.0
380-
Q_DECL_DEPRECATED bool preparePath( QString name = QString() );
381-
382347
/** Prepares cache image
383348
* @returns true in case of success, false if cache image size too large
384349
*/

src/core/symbology-ng/qgspointdisplacementrenderer.h

-4
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ class CORE_EXPORT QgsPointDisplacementRenderer: public QgsFeatureRenderer
105105
virtual bool legendSymbolItemChecked( const QString& key ) override;
106106
virtual void checkLegendSymbolItem( const QString& key, bool state = true ) override;
107107

108-
//! not available in python bindings
109-
//! @deprecated since 2.4
110-
Q_DECL_DEPRECATED void setDisplacementGroups( const QList<QMap<QgsFeatureId, QgsFeature> >& list ) { Q_UNUSED( list ); }
111-
112108
void setLabelFont( const QFont& f ) { mLabelFont = f; }
113109
QFont labelFont() const { return mLabelFont;}
114110

src/core/symbology-ng/qgsrulebasedrenderer.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,6 @@ void QgsRuleBasedRenderer::Rule::toSld( QDomDocument& doc, QDomElement &element,
396396
}
397397
}
398398

399-
bool QgsRuleBasedRenderer::Rule::startRender( QgsRenderContext& context, const QgsFields& fields )
400-
{
401-
QString filter;
402-
return startRender( context, fields, filter );
403-
}
404-
405399
bool QgsRuleBasedRenderer::Rule::startRender( QgsRenderContext& context, const QgsFields& fields, QString& filter )
406400
{
407401
mActiveChildren.clear();

src/core/symbology-ng/qgsrulebasedrenderer.h

-13
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,6 @@ class CORE_EXPORT QgsRuleBasedRenderer : public QgsFeatureRenderer
192192
*/
193193
QString description() const { return mDescription; }
194194

195-
//! @note added in 2.6
196-
//! @deprecated use active instead
197-
Q_DECL_DEPRECATED bool checkState() const { return mIsActive; }
198-
199195
/**
200196
* Returns if this rule is active
201197
*
@@ -244,10 +240,6 @@ class CORE_EXPORT QgsRuleBasedRenderer : public QgsFeatureRenderer
244240
*/
245241
void setDescription( const QString& description ) { mDescription = description; }
246242

247-
//! @note added in 2.6
248-
//! @deprecated use setActive instead
249-
Q_DECL_DEPRECATED void setCheckState( bool state ) { mIsActive = state; }
250-
251243
/**
252244
* Sets if this rule is active
253245
* @param state Determines if the rule should be activated or deactivated
@@ -266,11 +258,6 @@ class CORE_EXPORT QgsRuleBasedRenderer : public QgsFeatureRenderer
266258

267259
QDomElement save( QDomDocument& doc, QgsSymbolMap& symbolMap ) const;
268260

269-
/** Prepare the rule for rendering and its children (build active children array)
270-
* @deprecated use startRender( QgsRenderContext& context, const QgsFields& fields, QString& filter ) instead
271-
*/
272-
Q_DECL_DEPRECATED bool startRender( QgsRenderContext& context, const QgsFields& fields );
273-
274261
//! prepare the rule for rendering and its children (build active children array)
275262
bool startRender( QgsRenderContext& context, const QgsFields& fields, QString& filter );
276263

tests/src/python/test_qgssymbol.py

+13-12
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
QgsMapSettings,
4343
QgsRenderChecker,
4444
QgsSimpleMarkerSymbolLayer,
45+
QgsSimpleMarkerSymbolLayerBase,
4546
QgsUnitTypes,
4647
QgsWkbTypes
4748
)
@@ -207,15 +208,15 @@ def testSize(self):
207208
# create a marker symbol with a single layer
208209
markerSymbol = QgsMarkerSymbol()
209210
markerSymbol.deleteSymbolLayer(0)
210-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10))
211+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10))
211212
self.assertEqual(markerSymbol.size(), 10)
212213
markerSymbol.setSize(20)
213214
self.assertEqual(markerSymbol.size(), 20)
214215
self.assertEqual(markerSymbol.symbolLayer(0).size(), 20)
215216

216217
# add additional layers
217-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10))
218-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 30))
218+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10))
219+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=30))
219220
self.assertEqual(markerSymbol.size(), 30)
220221
markerSymbol.setSize(3)
221222
self.assertEqual(markerSymbol.size(), 3)
@@ -230,15 +231,15 @@ def testAngle(self):
230231
# create a marker symbol with a single layer
231232
markerSymbol = QgsMarkerSymbol()
232233
markerSymbol.deleteSymbolLayer(0)
233-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10, 90))
234+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10, angle=90))
234235
self.assertEqual(markerSymbol.angle(), 90)
235236
markerSymbol.setAngle(100)
236237
self.assertEqual(markerSymbol.angle(), 100)
237238
self.assertEqual(markerSymbol.symbolLayer(0).angle(), 100)
238239

239240
# add additional layers
240-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10, 130))
241-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10, 150))
241+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10, angle=130))
242+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10, angle=150))
242243
# should take first layer's angle
243244
self.assertEqual(markerSymbol.angle(), 100)
244245
markerSymbol.setAngle(10)
@@ -254,15 +255,15 @@ def testSizeUnit(self):
254255
# create a marker symbol with a single layer
255256
markerSymbol = QgsMarkerSymbol()
256257
markerSymbol.deleteSymbolLayer(0)
257-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10))
258+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10))
258259
self.assertEqual(markerSymbol.sizeUnit(), QgsUnitTypes.RenderMillimeters)
259260
markerSymbol.setSizeUnit(QgsUnitTypes.RenderMapUnits)
260261
self.assertEqual(markerSymbol.sizeUnit(), QgsUnitTypes.RenderMapUnits)
261262
self.assertEqual(markerSymbol.symbolLayer(0).sizeUnit(), QgsUnitTypes.RenderMapUnits)
262263

263264
# add additional layers
264-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10))
265-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 30))
265+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10))
266+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=30))
266267
# should now be mixed size units
267268
self.assertEqual(markerSymbol.sizeUnit(), QgsUnitTypes.RenderUnknownUnit)
268269
markerSymbol.setSizeUnit(QgsUnitTypes.RenderPixels)
@@ -278,16 +279,16 @@ def testSizeMapUnitScale(self):
278279
# create a marker symbol with a single layer
279280
markerSymbol = QgsMarkerSymbol()
280281
markerSymbol.deleteSymbolLayer(0)
281-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10))
282+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10))
282283
markerSymbol.symbolLayer(0).setSizeMapUnitScale(QgsMapUnitScale(10000, 20000))
283284
self.assertEqual(markerSymbol.sizeMapUnitScale(), QgsMapUnitScale(10000, 20000))
284285
markerSymbol.setSizeMapUnitScale(QgsMapUnitScale(1000, 2000))
285286
self.assertEqual(markerSymbol.sizeMapUnitScale(), QgsMapUnitScale(1000, 2000))
286287
self.assertEqual(markerSymbol.symbolLayer(0).sizeMapUnitScale(), QgsMapUnitScale(1000, 2000))
287288

288289
# add additional layers
289-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 10))
290-
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer('star', QColor(255, 0, 0), QColor(0, 255, 0), 30))
290+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=10))
291+
markerSymbol.appendSymbolLayer(QgsSimpleMarkerSymbolLayer(QgsSimpleMarkerSymbolLayerBase.Star, color=QColor(255, 0, 0), borderColor=QColor(0, 255, 0), size=30))
291292
# should take first layer's map unit scale
292293
self.assertEqual(markerSymbol.sizeMapUnitScale(), QgsMapUnitScale(1000, 2000))
293294
markerSymbol.setSizeMapUnitScale(QgsMapUnitScale(3000, 4000))

0 commit comments

Comments
 (0)