mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Partial fix for ticket #444 (low resolution map composer maps). Hope
I'm fixing it the right way :) git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6275 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
3f4af92f1f
commit
3795371c9d
@ -117,11 +117,13 @@ void QgsComposerMap::draw ( QPainter *painter, QgsRect *extent, QgsMapToPixel *t
|
||||
if ( layer->type() == QgsMapLayer::VECTOR ) {
|
||||
QgsVectorLayer *vector = dynamic_cast <QgsVectorLayer*> (layer);
|
||||
|
||||
double widthScale = mWidthScale * mComposition->scale();
|
||||
if ( plotStyle() == QgsComposition::Preview && mPreviewMode == Render ) {
|
||||
widthScale *= mComposition->viewScale();
|
||||
double widthScale = mWidthScale;
|
||||
double symbolScale = mSymbolScale;
|
||||
if (plotStyle() != QgsComposition::Preview)
|
||||
{
|
||||
widthScale /= mComposition->viewScale();
|
||||
symbolScale /= mComposition->viewScale();
|
||||
}
|
||||
double symbolScale = mSymbolScale * mComposition->scale();
|
||||
|
||||
QgsRect r1, r2;
|
||||
r1 = *extent;
|
||||
@ -205,7 +207,8 @@ void QgsComposerMap::cache ( void )
|
||||
// 1 pixel in cache should have ia similar size as 1 pixel in canvas
|
||||
// but it can result in big cache -> limit
|
||||
|
||||
int w = Q3CanvasRectangle::width() < 1000 ? Q3CanvasRectangle::width() : 1000;
|
||||
int w = Q3CanvasRectangle::width() * mComposition->viewScale();
|
||||
w = w < 1000 ? w : 1000;
|
||||
int h = (int) ( mExtent.height() * w / mExtent.width() );
|
||||
// It can happen that extent is not initialised well -> check
|
||||
if ( h < 1 || h > 10000 ) h = w;
|
||||
|
Loading…
x
Reference in New Issue
Block a user