[QGIS Commit] r9482 - trunk/qgis/src/core/symbology

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Oct 16 15:35:30 EDT 2008


Author: timlinux
Date: 2008-10-16 15:35:30 -0400 (Thu, 16 Oct 2008)
New Revision: 9482

Modified:
   trunk/qgis/src/core/symbology/qgssymbol.cpp
Log:
Fix incorrect transparency for symbology previews in legend and vector props dialog

Modified: trunk/qgis/src/core/symbology/qgssymbol.cpp
===================================================================
--- trunk/qgis/src/core/symbology/qgssymbol.cpp	2008-10-16 18:39:36 UTC (rev 9481)
+++ trunk/qgis/src/core/symbology/qgssymbol.cpp	2008-10-16 19:35:30 UTC (rev 9482)
@@ -248,7 +248,8 @@
   //Note by Tim: dont use premultiplied - it causes
   //artifacts on the output icon!
   QImage img( 15, 15, QImage::Format_ARGB32 );//QImage::Format_ARGB32_Premultiplied);
-  img.fill( QColor( 255, 255, 255, 255 ).rgba() );
+  //0 = fully transparent
+  img.fill( QColor( 255, 255, 255, 0 ).rgba() );
   QPainter p( &img );
   p.setRenderHints( QPainter::Antialiasing );
   p.setPen( mPen );
@@ -267,7 +268,8 @@
   //Note by Tim: dont use premultiplied - it causes
   //artifacts on the output icon!
   QImage img( 15, 15, QImage::Format_ARGB32 ); //, QImage::Format_ARGB32_Premultiplied);
-  img.fill( QColor( 255, 255, 255, 255 ).rgba() );
+  //0 = fully transparent
+  img.fill( QColor( 255, 255, 255, 0 ).rgba() );
   QPainter p( &img );
   p.setRenderHints( QPainter::Antialiasing );
   p.setPen( mPen );
@@ -346,12 +348,16 @@
   {
     pen.setColor( selectionColor );
     QBrush brush = mBrush;
-    preRotateImage = QgsMarkerCatalogue::instance()->imageMarker( mPointSymbolName, ( float )( mPointSize * scale * widthScale * rasterScaleFactor ),
+    preRotateImage = QgsMarkerCatalogue::instance()->imageMarker(
+        mPointSymbolName, ( float )( mPointSize * scale * widthScale *
+          rasterScaleFactor ),
                      pen, mBrush );
   }
   else
   {
-    preRotateImage = QgsMarkerCatalogue::instance()->imageMarker( mPointSymbolName, ( float )( mPointSize * scale * widthScale * rasterScaleFactor ),
+    preRotateImage = QgsMarkerCatalogue::instance()->imageMarker(
+        mPointSymbolName, ( float )( mPointSize * scale * widthScale *
+          rasterScaleFactor ),
                      pen, mBrush );
   }
 



More information about the QGIS-commit mailing list