Skip to content

Commit c8a6566

Browse files
committedSep 7, 2015
Fix reprojected markers
1 parent 9c5a74a commit c8a6566

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed
 

‎src/core/symbology-ng/qgslinesymbollayerv2.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,21 +1007,21 @@ void QgsMarkerLineSymbolLayerV2::renderPolylineVertex( const QPolygonF& points,
10071007

10081008
QgsVertexId vId;
10091009
QgsPointV2 vPoint;
1010-
double z;
1010+
double x, y, z;
10111011
QPointF mapPoint;
10121012
while ( context.renderContext().geometry()->nextVertex( vId, vPoint ) )
10131013
{
10141014
if (( placement == Vertex && vId.type == QgsVertexId::SegmentVertex )
10151015
|| ( placement == CurvePoint && vId.type == QgsVertexId::CurveVertex ) )
10161016
{
10171017
//transform
1018-
mapPoint.setX( vPoint.x() ); mapPoint.setY( vPoint.y() ); z = vPoint.z();
1019-
mtp.transformInPlace( mapPoint.rx(), mapPoint.ry() );
1018+
x = vPoint.x(), y = vPoint.y(); z = vPoint.z();
10201019
if ( ct )
10211020
{
1022-
ct->transformInPlace( mapPoint.rx(), mapPoint.ry(), z );
1021+
ct->transformInPlace( x, y, z );
10231022
}
1024-
1023+
mapPoint.setX( x ); mapPoint.setY( y );
1024+
mtp.transformInPlace( mapPoint.rx(), mapPoint.ry() );
10251025
if ( mRotateMarker )
10261026
{
10271027
double angle = context.renderContext().geometry()->vertexAngle( vId );

‎src/core/symbology-ng/qgsrendererv2.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,17 +443,18 @@ void QgsFeatureRendererV2::renderFeatureWithSymbol( QgsFeature& feature, QgsSymb
443443

444444
QgsPointV2 vertexPoint;
445445
QgsVertexId vertexId;
446-
double z;
446+
double x, y, z;
447447
QPointF mapPoint;
448448
while ( geom->geometry()->nextVertex( vertexId, vertexPoint ) )
449449
{
450450
//transform
451-
mapPoint.setX( vertexPoint.x() ); mapPoint.setY( vertexPoint.y() ); z = vertexPoint.z();
452-
mtp.transformInPlace( mapPoint.rx(), mapPoint.ry() );
451+
x = vertexPoint.x(); y = vertexPoint.y(); z = vertexPoint.z();
453452
if ( ct )
454453
{
455-
ct->transformInPlace( mapPoint.rx(), mapPoint.ry(), z );
454+
ct->transformInPlace( x, y, z );
456455
}
456+
mapPoint.setX( x ); mapPoint.setY( y );
457+
mtp.transformInPlace( mapPoint.rx(), mapPoint.ry() );
457458
renderVertexMarker( mapPoint, context );
458459
}
459460
}

0 commit comments

Comments
 (0)
Please sign in to comment.