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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat May 17 08:47:42 EDT 2008


Author: mhugent
Date: 2008-05-17 08:47:42 -0400 (Sat, 17 May 2008)
New Revision: 8450

Modified:
   trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp
Log:
Some cleanup in point rendering code

Modified: trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp
===================================================================
--- trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp	2008-05-17 12:24:15 UTC (rev 8449)
+++ trunk/qgis/src/core/symbology/qgsmarkercatalogue.cpp	2008-05-17 12:47:42 UTC (rev 8450)
@@ -202,11 +202,6 @@
   double x_c = s/2;
   double y_c = x_c;
 
-  // Picture
-  QPicture picture;
-  thepPainter->begin(&picture);
-  thepPainter->setRenderHint(QPainter::Antialiasing);
-
   // Also width must be odd otherwise there are discrepancies visible in canvas!
   double lw = pen.widthF();//(int)(2*floor((double)pen.widthF()/2)+1); // -> lw > 0
   pen.setWidthF(lw);
@@ -217,7 +212,7 @@
   // Circle radius, is used for other figures also, when compensating for line
   // width is necessary.
 
-  double r = (s-2*lw)/2-1;
+  int r = (s-2*lw)/2 - 1;
   QgsDebugMsg(QString("Hard marker radius %1").arg(r));
 
   if ( name == "circle" ) 
@@ -229,7 +224,7 @@
     x_c -= ((lw+5)/4);
     y_c -= ((lw+5)/4);
 
-    thepPainter->drawEllipse(x_c-r, y_c-r, x_c+r, y_c+r);
+    thepPainter->drawEllipse(QRectF(x_c-r, y_c-r, x_c+r, y_c+r));
   } 
   else if ( name == "rectangle" ) 
   {



More information about the QGIS-commit mailing list