Skip to content

Commit e352e48

Browse files
author
timlinux
committedJan 23, 2006
Get rid of artifacts behind hard markers drawn using qpicture
Note tehre is still some scaling issue with these that I am looking into git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4724 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/core/qgsmarkercatalogue.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ QPixmap QgsMarkerCatalogue::marker ( QString fullName, int size, QPen pen, QBrus
9090
if ( fullName.left(5) == "hard:" ) {
9191
QPicture myPicture = hardMarker ( fullName.mid(5), size, pen, brush, qtBug );
9292
QPixmap myPixmap = QPixmap (myPicture.width(),myPicture.height());
93+
myPixmap.fill(QColor(255,255,255,0)); //transparent
9394
QPainter myPainter(&myPixmap);
9495
myPainter.drawPicture(0,0,myPicture);
9596
return myPixmap;
@@ -126,6 +127,7 @@ QPicture QgsMarkerCatalogue::hardMarker ( QString name, int s, QPen pen, QBrush
126127
// Picture
127128
QPainter picpainter;
128129
picpainter.begin(&picture);
130+
picpainter.setRenderHint(QPainter::Antialiasing);
129131

130132
// Also width must be odd otherwise there are discrepancies visible in canvas!
131133
int lw = (int)(2*floor((double)pen.width()/2)+1); // -> lw > 0

0 commit comments

Comments
 (0)
Please sign in to comment.