@@ -40,7 +40,7 @@ QgsSymbol::QgsSymbol(QGis::VectorType t, QString lvalue, QString uvalue, QString
40
40
mLabel(label),
41
41
mType(t),
42
42
mPointSymbolName( " hard:circle" ),
43
- mPointSize( 3 ),
43
+ mPointSize( DEFAULT_POINT_SIZE ),
44
44
mPointSymbolImage(1 ,1 , QImage::Format_ARGB32_Premultiplied),
45
45
mWidthScale(1.0 ),
46
46
mCacheUpToDate( false ),
@@ -58,7 +58,7 @@ QgsSymbol::QgsSymbol(QGis::VectorType t, QString lvalue, QString uvalue, QString
58
58
mPen( c ),
59
59
mBrush( c ),
60
60
mPointSymbolName( " hard:circle" ),
61
- mPointSize( 3 ),
61
+ mPointSize( DEFAULT_POINT_SIZE ),
62
62
mPointSymbolImage(1 ,1 , QImage::Format_ARGB32_Premultiplied),
63
63
mWidthScale(1.0 ),
64
64
mCacheUpToDate( false ),
@@ -69,7 +69,7 @@ QgsSymbol::QgsSymbol(QGis::VectorType t, QString lvalue, QString uvalue, QString
69
69
70
70
QgsSymbol::QgsSymbol ()
71
71
: mPointSymbolName( " hard:circle" ),
72
- mPointSize( 3 ),
72
+ mPointSize( DEFAULT_POINT_SIZE ),
73
73
mPointSymbolImage(1 ,1 , QImage::Format_ARGB32_Premultiplied),
74
74
mWidthScale(1.0 ),
75
75
mCacheUpToDate( false ),
@@ -83,7 +83,7 @@ QgsSymbol::QgsSymbol(QColor c)
83
83
: mPen( c ),
84
84
mBrush( c ),
85
85
mPointSymbolName( " hard:circle" ),
86
- mPointSize( 3 ),
86
+ mPointSize( DEFAULT_POINT_SIZE ),
87
87
mPointSymbolImage(1 ,1 , QImage::Format_ARGB32_Premultiplied),
88
88
mWidthScale(1.0 ),
89
89
mCacheUpToDate( false ),
@@ -227,17 +227,17 @@ QString QgsSymbol::pointSymbolName() const
227
227
return mPointSymbolName ;
228
228
}
229
229
230
- void QgsSymbol::setPointSize (int s)
230
+ void QgsSymbol::setPointSize (double s)
231
231
{
232
- if ( s < 3 )
233
- mPointSize = 3 ;
234
- else
235
- mPointSize = s;
232
+ if ( s < MINIMUM_POINT_SIZE )
233
+ mPointSize = MINIMUM_POINT_SIZE ;
234
+ else
235
+ mPointSize = s;
236
236
237
- mCacheUpToDate = mCacheUpToDate2 = false ;
237
+ mCacheUpToDate = mCacheUpToDate2 = false ;
238
238
}
239
239
240
- int QgsSymbol::pointSize () const
240
+ double QgsSymbol::pointSize () const
241
241
{
242
242
return mPointSize ;
243
243
}
@@ -343,12 +343,12 @@ QImage QgsSymbol::getPointSymbolAsImage( double widthScale, bool selected, QCol
343
343
{
344
344
pen.setColor ( selectionColor );
345
345
QBrush brush = mBrush ;
346
- preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker ( mPointSymbolName , (int )(mPointSize * scale * widthScale * rasterScaleFactor),
346
+ preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker ( mPointSymbolName , (float )(mPointSize * scale * widthScale * rasterScaleFactor),
347
347
pen, mBrush );
348
348
}
349
349
else
350
350
{
351
- preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker ( mPointSymbolName , (int )(mPointSize * scale * widthScale * rasterScaleFactor),
351
+ preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker ( mPointSymbolName , (float )(mPointSize * scale * widthScale * rasterScaleFactor),
352
352
pen, mBrush );
353
353
}
354
354
@@ -517,7 +517,7 @@ bool QgsSymbol::readXML( QDomNode & synode )
517
517
if ( ! psizenode.isNull () )
518
518
{
519
519
QDomElement psizeelement = psizenode.toElement ();
520
- setPointSize ( psizeelement.text ().toInt () );
520
+ setPointSize ( psizeelement.text ().toFloat () );
521
521
}
522
522
523
523
mRotationClassificationField = -1 ;
0 commit comments