@@ -248,7 +248,8 @@ QImage QgsSymbol::getLineSymbolAsImage()
248
248
// Note by Tim: dont use premultiplied - it causes
249
249
// artifacts on the output icon!
250
250
QImage img ( 15 , 15 , QImage::Format_ARGB32 );// QImage::Format_ARGB32_Premultiplied);
251
- img.fill ( QColor ( 255 , 255 , 255 , 255 ).rgba () );
251
+ // 0 = fully transparent
252
+ img.fill ( QColor ( 255 , 255 , 255 , 0 ).rgba () );
252
253
QPainter p ( &img );
253
254
p.setRenderHints ( QPainter::Antialiasing );
254
255
p.setPen ( mPen );
@@ -267,7 +268,8 @@ QImage QgsSymbol::getPolygonSymbolAsImage()
267
268
// Note by Tim: dont use premultiplied - it causes
268
269
// artifacts on the output icon!
269
270
QImage img ( 15 , 15 , QImage::Format_ARGB32 ); // , QImage::Format_ARGB32_Premultiplied);
270
- img.fill ( QColor ( 255 , 255 , 255 , 255 ).rgba () );
271
+ // 0 = fully transparent
272
+ img.fill ( QColor ( 255 , 255 , 255 , 0 ).rgba () );
271
273
QPainter p ( &img );
272
274
p.setRenderHints ( QPainter::Antialiasing );
273
275
p.setPen ( mPen );
@@ -346,12 +348,16 @@ QImage QgsSymbol::getPointSymbolAsImage( double widthScale, bool selected, QColo
346
348
{
347
349
pen.setColor ( selectionColor );
348
350
QBrush brush = mBrush ;
349
- preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker ( mPointSymbolName , ( float )( mPointSize * scale * widthScale * rasterScaleFactor ),
351
+ preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker (
352
+ mPointSymbolName , ( float )( mPointSize * scale * widthScale *
353
+ rasterScaleFactor ),
350
354
pen, mBrush );
351
355
}
352
356
else
353
357
{
354
- preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker ( mPointSymbolName , ( float )( mPointSize * scale * widthScale * rasterScaleFactor ),
358
+ preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker (
359
+ mPointSymbolName , ( float )( mPointSize * scale * widthScale *
360
+ rasterScaleFactor ),
355
361
pen, mBrush );
356
362
}
357
363
0 commit comments