40 if (
mMapCanvas->property(
"retro" ).toBool() )
41 mImage = mImage.scaled( mImage.width() / 3, mImage.height() / 3 )
42 .convertToFormat( QImage::Format_Indexed8, Qt::OrderedDither | Qt::OrderedAlphaDither );
50 if ( mImage.size() != QSize( w, h ) )
52 QgsDebugMsg( QString(
"map paint DIFFERENT SIZE: img %1,%2 item %3,%4" ).arg( mImage.width() ).arg( mImage.height() ).arg( w ).arg( h ) );
57 painter->drawImage( QRect( 0, 0, w, h ), mImage );
62 QPointF c = br.center();
63 double rad =
std::max( br.width(), br.height() ) / 10;
64 painter->drawRoundedRect( br, rad, rad );
65 painter->drawLine( QLineF( 0, 0, br.width(), br.height() ) );
66 painter->drawLine( QLineF( br.width(), 0, 0, br.height() ) );
68 double nw = br.width() * 0.5;
double nh = br.height() * 0.5;
69 br = QRectF( c - QPointF( nw / 2, nh / 2 ), QSize( nw, nh ) );
70 painter->drawRoundedRect( br, rad, rad );
72 nw = br.width() * 0.5; nh = br.height() * 0.5;
73 br = QRectF( c - QPointF( nw / 2, nh / 2 ), QSize( nw, nh ) );
74 painter->drawRoundedRect( br, rad, rad );