[Qgis-developer] Re: composer redesign branch

Steven Bell botsnlinux at gmail.com
Tue Mar 4 11:26:08 EST 2008


>
> So my suggestion is to have the rendering context somehow like this:
>
> class QgsMapRenderContext
> {
>        QgsMapToPixel mMapToPixel;
>        QgsCoordinateTransform mCoordTransform;
>        QgsRect mExtent;
>        bool drawEditingInformation;
>        bool mRenderingStopped;
>        double mResolutionRatio;
> };
>
> The resolution ratio is usually 1, except when drawing to a different
> paint
> device (like QPrinter). I hope it will allow to consider for different
> line
> width / symbol sizes on these output devices.


>From what I understand, QgsMapToPixel basically holds the information that
mResolutionRatio would contain.

Martin already mentioned this, but the rendering context needs to have some
way to tell the renderer whether to use maximum-resolution vector ouput or
cached pixmaps.  I would also add something about what the output units are,
whether pixels or millimeters.  Both of the above might be done together
with an "are we printing to ps/pdf/svg" bool.

I would remove symbolScale and widthScale in favor of defining the widths in
terms of concrete units, whether pixels, millimeters, or map units.  This is
what I have attempted to do in the current composer_redesign code.
One of the major problems is that printed millimeters are treated as the
same as screen pixels, rather than a separate but similar type of
measurement.

I hope this makes sense.  Let me know if I need to clarify anything.
Steven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20080304/1b6acdbc/attachment.html


More information about the Qgis-developer mailing list