On Friday 20 May 2016 07:14:15 Uwe Rathmann wrote: > On Wed, 18 May 2016 15:57:04 -0300, Lisandro Damián Nicanor Pérez Meyer > > wrote: > > Now if I add a lot of straight lines (QGraphicsLineItem instances) > > performance (number of movements seen on screen per second) varies > > according the zoom. If I zoom in I get to a point in which everything is > > too slow. > > Qt does the polygon clipping very late, so a huge amount of pointless > caclulations is going on before it detects that it is not needed. IIRC > the Graphics View framework isn't any better than QPainter - but I havn't > checked the code quite some time. > > If this is still the case you need to implement your own polygon clipping > before entering Qt rendering code. > > At least this is what I do it in the Qwt project ( qwt.sf.net ). If you > need an implementation for polygon clipping you find something there too: > see https://sourceforge.net/p/qwt/code/HEAD/tree/trunk/qwt/src/ > qwt_clipper.cpp
That sound svery plausible indeed! For now I switched to staright lines and "works for the moment", but if I need to speed up things or go back to other kind of lines I'll surely give it a look. Thanks a lot!! -- If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas. George Bernard Shaw Lisandro Damián Nicanor Pérez Meyer http://perezmeyer.com.ar/ http://perezmeyer.blogspot.com/
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest