Skip to content

Commit a353a4d

Browse files
author
Sandro Santilli
committed
Set all QgsMapToPixel parameters at once from QgsMapSettings
1 parent cebb6ff commit a353a4d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/qgsmapsettings.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,12 @@ void QgsMapSettings::updateDerived()
157157
mScaleCalculator.setDpi( mDpi );
158158
mScale = mScaleCalculator.calculate( mVisibleExtent, mSize.width() );
159159

160-
mMapToPixel = QgsMapToPixel( mapUnitsPerPixel(), outputSize().height(), visibleExtent().yMinimum(), visibleExtent().xMinimum() );
161-
mMapToPixel.setMapRotation( mRotation, visibleExtent().center().x(), visibleExtent().center().y() );
160+
mMapToPixel.setParameters( mapUnitsPerPixel(),
161+
visibleExtent().center().x(),
162+
visibleExtent().center().y(),
163+
outputSize().width(),
164+
outputSize().height(),
165+
mRotation);
162166

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

0 commit comments

Comments
 (0)