Hi guys,
Is there a build-in method( in QPainter, for instance) that can help to create a clipped polygon?
I have a rect(scene rectangle) + polygon that is drawn on the scene. When the whole polygon is visible it draws background really fast, but when I zoom IN it draws very slowly;
I have already have line clip method, which increased the speed of redrawing, but now have to get a polygon clip.
Any idea?
Or maybe if no clipper' like method in Qt, do you know an open source C++ code implementing polygon clipping?
Thank you,
Kacper


Reply With Quote

If you can, avoid clipping and rely on graphics view's indexing by dividing your polygon into smaller polygons or do your own vertex based indexing and try to use it for clipping. But it might not be worth the effort - dividing the item should be simpler and you would only do it once. You can also try those brand new caching mechanisms in graphics view, but they might be ineffective when you start zooming.

Bookmarks