Skip to content

Commit

Permalink
Fixed positioning of font markers with rotation (#2380).
Browse files Browse the repository at this point in the history
Allow rotation up to 360 degrees in the settings widget.


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12808 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jan 20, 2010
1 parent a3312b6 commit 4a228f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
Expand Up @@ -524,14 +524,13 @@ void QgsFontMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2R
p->setPen( mColor );
p->setFont( mFont );

p->save();
p->translate(point);
if ( mAngle != 0 )
{
p->save();
p->rotate( mAngle );
}
p->drawText( point - mChrOffset, mChr );
if ( mAngle != 0 )
p->restore();

p->drawText(-mChrOffset, mChr );
p->restore();
}

QgsStringMap QgsFontMarkerSymbolLayerV2::properties() const
Expand Down
3 changes: 3 additions & 0 deletions src/ui/symbollayer/widget_fontmarker.ui
Expand Up @@ -62,6 +62,9 @@
<property name="decimals">
<number>1</number>
</property>
<property name="maximum">
<double>360.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
Expand Down

0 comments on commit 4a228f5

Please sign in to comment.