[Qgis-developer] Re: composer redesign branch

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Tue Mar 4 10:01:23 EST 2008


Am Dienstag 04 März 2008 02:06:49 schrieb Martin Dobias:
> On Mon, Mar 3, 2008 at 5:45 PM, Marco Hugentobler
>
> <marco.hugentobler at karto.baug.ethz.ch> wrote:
> >  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;
> >  };
>
> Yes, something like that should do it...
> We should also include a member like "force vector output" which will
> tell to renderer whether it can use just a rendered pixmap of a symbol
> or whether it should render the symbol directly - this is where map
> composer is failing.

A possibility would be to force  vector output if mResolution is != 1.0. But 
it may be better to make that explicitly and not depending on resolution as 
you suggest.

>
> >  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.
>
> When looking at QgsVectorLayer::draw(), there's symbolScale and
> widthScale... are both of them covered by mResolutionRatio?

I'm not sure. In principle, one should be enough for symbol and width scaling 
as both are dependent on resolutions.


So I'm waiting a few days for any further input or objections, then I'm going 
to create the branch.

cheers,
Marco




-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee


More information about the Qgis-developer mailing list