Skip to content
Permalink
Browse files

Fix reprojected markers

  • Loading branch information
mhugent committed Sep 7, 2015
1 parent 9c5a74a commit c8a65668edc0231a78c1dd4bbde0e5110c92b9fb
Showing with 10 additions and 9 deletions.
  1. +5 −5 src/core/symbology-ng/qgslinesymbollayerv2.cpp
  2. +5 −4 src/core/symbology-ng/qgsrendererv2.cpp
@@ -1007,21 +1007,21 @@ void QgsMarkerLineSymbolLayerV2::renderPolylineVertex( const QPolygonF& points,

QgsVertexId vId;
QgsPointV2 vPoint;
double z;
double x, y, z;
QPointF mapPoint;
while ( context.renderContext().geometry()->nextVertex( vId, vPoint ) )
{
if (( placement == Vertex && vId.type == QgsVertexId::SegmentVertex )
|| ( placement == CurvePoint && vId.type == QgsVertexId::CurveVertex ) )
{
//transform
mapPoint.setX( vPoint.x() ); mapPoint.setY( vPoint.y() ); z = vPoint.z();
mtp.transformInPlace( mapPoint.rx(), mapPoint.ry() );
x = vPoint.x(), y = vPoint.y(); z = vPoint.z();
if ( ct )
{
ct->transformInPlace( mapPoint.rx(), mapPoint.ry(), z );
ct->transformInPlace( x, y, z );
}

mapPoint.setX( x ); mapPoint.setY( y );
mtp.transformInPlace( mapPoint.rx(), mapPoint.ry() );
if ( mRotateMarker )
{
double angle = context.renderContext().geometry()->vertexAngle( vId );
@@ -443,17 +443,18 @@ void QgsFeatureRendererV2::renderFeatureWithSymbol( QgsFeature& feature, QgsSymb

QgsPointV2 vertexPoint;
QgsVertexId vertexId;
double z;
double x, y, z;
QPointF mapPoint;
while ( geom->geometry()->nextVertex( vertexId, vertexPoint ) )
{
//transform
mapPoint.setX( vertexPoint.x() ); mapPoint.setY( vertexPoint.y() ); z = vertexPoint.z();
mtp.transformInPlace( mapPoint.rx(), mapPoint.ry() );
x = vertexPoint.x(); y = vertexPoint.y(); z = vertexPoint.z();
if ( ct )
{
ct->transformInPlace( mapPoint.rx(), mapPoint.ry(), z );
ct->transformInPlace( x, y, z );
}
mapPoint.setX( x ); mapPoint.setY( y );
mtp.transformInPlace( mapPoint.rx(), mapPoint.ry() );
renderVertexMarker( mapPoint, context );
}
}

0 comments on commit c8a6566

Please sign in to comment.
You can’t perform that action at this time.