[Qgis-developer] qgis pre-refresh rendering ?

Sandro Santilli strk at keybit.net
Sat Dec 13 09:01:13 PST 2014

On Sat, Dec 13, 2014 at 05:40:10PM +0100, Sandro Santilli wrote:
> On Sat, Dec 13, 2014 at 10:40:44PM +0700, Martin Dobias wrote:

> > The rect() and setRect() is just our added convenience functionality in
> > QgsMapCanvasItem. The idea was that you just use setRect() to specify the
> > item's position+size in map coordinates - and the pos() and boundingRect()
> > will be set according to that. In addition, calls to updatePosition() from
> > map canvas make sure that pos() and boundingRect() are kept in sync with
> > changes to the canvas.
> The problem with that, as you can see, is that it is assumed that
> a single rectangle can fully express a map configuration, but that's
> only true when there's no rotation.

Actually, worst than this, it is assumed that a rectangle in map units
can express a size in device units. And the (pre-rotation-commit) code
to compute that (size in device units) was transforming the upper-left
and lower-right corners of the rectangle to device coordinates and
computing their distance.

For a 90 degrees rotated extent that gives a size of 0 in one direction...


 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  

More information about the Qgis-developer mailing list