@@ -1928,37 +1928,23 @@ void QgsComposerMap::drawOverviewMapExtent( QPainter* p )
1928
1928
{
1929
1929
return ;
1930
1930
}
1931
- else if ( mComposition ->plotStyle () == QgsComposition::Preview )
1932
- {
1933
- context.setScaleFactor ( 1.0 );
1934
- context.setRasterScaleFactor ( /* 96.0*/ mComposition ->printResolution () / 25.4 );
1935
- }
1936
- else // print
1931
+ else
1937
1932
{
1938
1933
context.setScaleFactor ( 1.0 );
1939
- double rasterScaleFactor = mComposition ->printResolution () / 25.4 ;
1940
- context.setRasterScaleFactor ( rasterScaleFactor );
1934
+ context.setRasterScaleFactor ( mComposition ->printResolution () / 25.4 );
1941
1935
}
1942
1936
1943
1937
QPolygonF polygon;
1944
1938
double x = ( intersectRect.xMinimum () - thisExtent.xMinimum () ) / thisExtent.width () * rect ().width ();
1945
1939
double y = ( thisExtent.yMaximum () - intersectRect.yMaximum () ) / thisExtent.height () * rect ().height ();
1946
1940
double width = intersectRect.width () / thisExtent.width () * rect ().width ();
1947
1941
double height = intersectRect.height () / thisExtent.height () * rect ().height ();
1948
- polygon << QPointF ( x, y ) << QPointF ( x + width, y ) << QPointF ( x + width, y + height ) << QPointF ( x, y + height );
1942
+ polygon << QPointF ( x, y ) << QPointF ( x + width, y ) << QPointF ( x + width, y + height ) << QPointF ( x, y + height ) << QPointF ( x, y ) ;
1949
1943
1950
1944
QList<QPolygonF> rings; // empty list
1951
1945
mOverviewFrameMapSymbol ->startRender ( context );
1952
1946
mOverviewFrameMapSymbol ->renderPolygon ( polygon, &rings, 0 , context );
1953
1947
mOverviewFrameMapSymbol ->stopRender ( context );
1954
-
1955
- /* p->setPen( QPen( Qt::red ) ); //todo: make appearance configurable
1956
- p->setBrush( QBrush( QColor( 255, 0, 0, 100 ) ) );
1957
- double x = ( intersectRect.xMinimum() - thisExtent.xMinimum() ) / thisExtent.width() * rect().width();
1958
- double y = ( thisExtent.yMaximum() - intersectRect.yMaximum() ) / thisExtent.height() * rect().height();
1959
- double width = intersectRect.width() / thisExtent.width() * rect().width();
1960
- double height = intersectRect.height() / thisExtent.height() * rect().height();
1961
- p->drawRect( QRectF( x, y, width, height ) );*/
1962
1948
}
1963
1949
1964
1950
void QgsComposerMap::createDefaultOverviewFrameSymbol ()
0 commit comments