21 #include <QtConcurrentMap>
37 : mSettings( settings )
80 static const double splitCoord = 180.0;
82 if ( layerCrsGeographic )
94 if ( ll.
x() > ur.
x() )
120 extent =
QgsRectangle( -DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX );
129 extent =
QgsRectangle( -DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX );
130 r2 =
QgsRectangle( -DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX );
149 QgsDebugMsg( QString(
"CACHE VALID: %1" ).arg( cacheValid ) );
150 Q_UNUSED( cacheValid );
155 while ( li.hasPrevious() )
157 QString layerId = li.previous();
159 QgsDebugMsg(
"Rendering at layer item " + layerId );
165 mErrors.append(
Error( layerId,
tr(
"Layer not found in registry." ) ) );
169 QgsDebugMsg( QString(
"layer %1: minscale:%2 maxscale:%3 scaledepvis:%4 blendmode:%5" )
179 QgsDebugMsg(
"Layer not rendered because it is not within the defined visibility scale range" );
194 if ( !r1.
isFinite() || !r2.isFinite() )
196 mErrors.append(
Error( layerId,
tr(
"There was a problem transforming the layer's extent. Layer skipped." ) ) );
239 QImage * mypFlattenedImage = 0;
243 if ( mypFlattenedImage->isNull() )
246 delete mypFlattenedImage;
247 layerJobs.removeLast();
250 mypFlattenedImage->fill( 0 );
252 job.
img = mypFlattenedImage;
253 QPainter* mypPainter =
new QPainter( job.
img );
259 if ( hasStyleOverride )
264 if ( hasStyleOverride )
283 for ( LayerRenderJobs::iterator it = jobs.begin(); it != jobs.end(); ++it )
322 QPainter painter( &image );
324 for ( LayerRenderJobs::const_iterator it = jobs.constBegin(); it != jobs.constEnd(); ++it )
328 painter.setCompositionMode( job.
blendMode );
330 Q_ASSERT( job.
img != 0 );
331 painter.drawImage( 0, 0, *job.
img );