Fix reprojected markers

This commit is contained in:
Marco Hugentobler 2015-09-07 11:26:17 +02:00
parent 9c5a74a393
commit c8a65668ed
2 changed files with 10 additions and 9 deletions

View File

@ -1007,7 +1007,7 @@ 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 ) )
{
@ -1015,13 +1015,13 @@ void QgsMarkerLineSymbolLayerV2::renderPolylineVertex( const QPolygonF& points,
|| ( 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 );

View File

@ -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 );
}
}