PDA

View Full Version : Moving the (0.0) point on the scene



maverick_pol
6th September 2007, 15:29
Hi guys,

The (0.0) point is located as the left upper corner of the scene. I would like to ask, is it possible to change the (0.0) point position, so it would be a point somewhere in the middle of the scene, and scene coordinates would be changing as the (0.0) point was there. I have a map and the (0,0) point is almost the center point of that map and status bar show the coordinates(x S/W , y N/E). Any idea how to achieve this?
Thank you beforehand.

Maverick

wysota
6th September 2007, 15:34
Of course.

QGraphicsScene *sc = new QGraphicsScene(-100, -100, 200, 200);

This will give you a scene with coordinates ranging from -100 to +100 in both directions.