Skip to content

Commit

Permalink
Improve marker positioning
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4725 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 23, 2006
1 parent e352e48 commit fbf1787
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/gui/qgsvectorlayer.cpp
Expand Up @@ -3358,12 +3358,8 @@ void QgsVectorLayer::drawFeature(QPainter* p, QgsFeature* fet, QgsMapToPixel * t

p->save();
p->scale(markerScaleFactor,markerScaleFactor);
p->drawPixmap(static_cast<int>(x / markerScaleFactor
- marker->width()
- marker->width() / 2),
static_cast<int>(y / markerScaleFactor
- marker->height()
- marker->height() / 2),
p->drawPixmap(static_cast<int>(x-(marker->width()/2)) ,
static_cast<int>(y-(marker->height()/2) ),
*marker);
p->restore();

Expand Down Expand Up @@ -3399,12 +3395,8 @@ void QgsVectorLayer::drawFeature(QPainter* p, QgsFeature* fet, QgsMapToPixel * t
needToTrim = true;
else
#endif
p->drawPixmap(static_cast<int>(x / markerScaleFactor
- marker->width()
- marker->width() / 2),
static_cast<int>(y / markerScaleFactor
- marker->height()
- marker->height() / 2),
p->drawPixmap(static_cast<int>(x-(marker->width()/2)) ,
static_cast<int>(y-(marker->height()/2) ),
*marker);
}
p->restore();
Expand Down

0 comments on commit fbf1787

Please sign in to comment.