[Qgis-developer] rendercontext-branch

Hugentobler Marco marco.hugentobler at karto.baug.ethz.ch
Mon Apr 7 12:11:42 EDT 2008

Hi devs,

I started a wiki page about the changes in the rendercontext branch:

Although the work in the branch is not completely finished, it would be good for me to have some feedback. The most important changes in the branch are:

- QgsRenderContext object encapsulates rendering parameters and is passed to all map layers 
- QgsRenderContext::mRenderingStopped is set to true to notify the layers that rendering was canceled (with esc key or check box) 
- QgsRenderContext::mScaleFactor allows to scale outline widths and image sizes. This is important to allow QGIS main canvas and print composer output to look the same. QgsMapRender now sets this scaling factor such that units are always mm 
- Similarly, QgsRenderContext::mRasterScaleFactor allows for different raster resolutions. The problem is that some devices work with pixels as units (e.g. QImage, QPixmap, widgets), but others work with logical units (e.g. QGraphicsView). To allow for a correct resolution, raster layers and point marker images are oversampled by mRasterScaleFactor and scaled down afterwards.


More information about the Qgis-developer mailing list