PDA

View Full Version : Optimizing polygon clipping in QGraphicsScene drawing



maverick_pol
19th September 2008, 14:35
Hi,

I have a custom foreground implementation for my QGraphicsScene.
I draw a lot of polygon; Polygon clipping is yet very slow( I know that it will be working much faster in Qt4.5). I am looking for a solution for faster polygon drawing;
I draw a part of a map, coords in(-180,-90,180,90) build of polygons without borders;
I am thinking about this kind of a solution:
I would like to first paint my polygons on a image/pixmap, then paint the pixmap/image in the scene foreground; Maybe it will work faster?

I would like to consult this idea.

Thank you for any comment.

Kacper

jacek
28th September 2008, 21:41
It will work faster only if you won't redraw the contents of that pixmap in every paint event. Otherwise you will be doubling the work, since every widget already has a backing store.