PDA

View Full Version : Moving the QGraphicsScene background content



maverick_pol
13th May 2008, 18:23
Hi guys,

I am currently looking for the fastest solution for scrolling GraphicsScene background left or right. Let's say that I am drawing a world map in the background (extent -180,180) and the (0.0,0.0) is the center. The user though, can change the center of the map and scroll it left/right. I am currently thinking about using coordinates translation for achieving this feature.
Any other ideas? Thank you beforehand.

Kacper

thomir
13th May 2008, 19:54
Are you sure that that's what you want to do? Why not just scroll the graphics view across the background?

If you're trying to scroll the entire scene, just scroll the view instead...

maverick_pol
13th May 2008, 20:22
Hi,

Thanks for the advice. Yet, I am not sure which option to choose. That's why I am writing here.
After scrolling the scene/view I will have draw some additional data, still considering the "offset" and draw in according to the scroll.
Maybe scrolling the view is ok, I will check it.

Thanks

Kacper

maverick_pol
13th May 2008, 20:59
Hi,

When I set chart extent to (-360,-90),(360,90) I can scroll left/right, but how to redraw the part of the chart which disappears on the right to be drawn on left. Maybe it can be simple, but I can't find a way to achieve this for the time being. Any idea?

THanks
Kacper

maverick_pol
14th May 2008, 11:31
Hi,

Any idea how to achieve this king of scrolling, described above?

THanks.

Kacper

maverick_pol
16th May 2008, 07:37
Anyone? :)

Kacper