Skip to content
Permalink
Browse files

Set all QgsMapToPixel parameters at once from QgsMapSettings

  • Loading branch information
Sandro Santilli
Sandro Santilli committed Dec 9, 2014
1 parent cebb6ff commit a353a4ddf65ab6de9e35011be1d032673d126c79
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/core/qgsmapsettings.cpp
@@ -157,8 +157,12 @@ void QgsMapSettings::updateDerived()
mScaleCalculator.setDpi( mDpi );
mScale = mScaleCalculator.calculate( mVisibleExtent, mSize.width() );

mMapToPixel = QgsMapToPixel( mapUnitsPerPixel(), outputSize().height(), visibleExtent().yMinimum(), visibleExtent().xMinimum() );
mMapToPixel.setMapRotation( mRotation, visibleExtent().center().x(), visibleExtent().center().y() );
mMapToPixel.setParameters( mapUnitsPerPixel(),
visibleExtent().center().x(),
visibleExtent().center().y(),
outputSize().width(),
outputSize().height(),
mRotation);

#if 1 // set visible extent taking rotation in consideration
if ( mRotation )

0 comments on commit a353a4d

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