[Qgis-developer] Viewport rotation

Sandro Santilli strk at keybit.net
Fri Nov 21 07:26:35 PST 2014


On Fri, Nov 21, 2014 at 10:28:53AM +0100, Sandro Santilli wrote:
> On Thu, Nov 20, 2014 at 12:44:29PM -0700, Larry Shaffer wrote:

> > Maybe the feature pre-rotation could be done in the map renderer, prior to
> > sending to the labeling engine.
> 
> That's possibly what I've done by implementing rotation in QgsMapToPixel,

I'm kind of stuck in QgsMapToPixel as that class currently has no
knowledge of map "center". It has both min and max values for the Y
direction but for X it only has min value. 

There is also no "viewport size" to compute xMax from, so basically
I'm still missing the center of the map, which is what I would
have liked to use as anchor point for rotation.

Should I refactor the class to additionally hold a center, or an xMax ?

--strk; 

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


More information about the Qgis-developer mailing list