Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some cleanup in point rendering code
git-svn-id: http://svn.osgeo.org/qgis/trunk@8450 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 17, 2008
1 parent 328469a commit b0cbf1a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/core/symbology/qgsmarkercatalogue.cpp
Expand Up @@ -202,11 +202,6 @@ void QgsMarkerCatalogue::hardMarker (QPainter * thepPainter, QString name, doubl
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);
Expand All @@ -217,7 +212,7 @@ void QgsMarkerCatalogue::hardMarker (QPainter * thepPainter, QString name, doubl
// 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" )
Expand All @@ -229,7 +224,7 @@ void QgsMarkerCatalogue::hardMarker (QPainter * thepPainter, QString name, doubl
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" )
{
Expand Down

0 comments on commit b0cbf1a

Please sign in to comment.