@@ -248,7 +248,8 @@ QImage QgsSymbol::getLineSymbolAsImage()
248248 // Note by Tim: dont use premultiplied - it causes
249249 // artifacts on the output icon!
250250 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 () );
252253 QPainter p ( &img );
253254 p.setRenderHints ( QPainter::Antialiasing );
254255 p.setPen ( mPen );
@@ -267,7 +268,8 @@ QImage QgsSymbol::getPolygonSymbolAsImage()
267268 // Note by Tim: dont use premultiplied - it causes
268269 // artifacts on the output icon!
269270 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 () );
271273 QPainter p ( &img );
272274 p.setRenderHints ( QPainter::Antialiasing );
273275 p.setPen ( mPen );
@@ -346,12 +348,16 @@ QImage QgsSymbol::getPointSymbolAsImage( double widthScale, bool selected, QColo
346348 {
347349 pen.setColor ( selectionColor );
348350 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 ),
350354 pen, mBrush );
351355 }
352356 else
353357 {
354- preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker ( mPointSymbolName , ( float )( mPointSize * scale * widthScale * rasterScaleFactor ),
358+ preRotateImage = QgsMarkerCatalogue::instance ()->imageMarker (
359+ mPointSymbolName , ( float )( mPointSize * scale * widthScale *
360+ rasterScaleFactor ),
355361 pen, mBrush );
356362 }
357363
0 commit comments