If you have so many little spline pieces, maybe you could replace the cubicTo() call with a lineTo() call without a noticeable visual difference?
If you have so many little spline pieces, maybe you could replace the cubicTo() call with a lineTo() call without a noticeable visual difference?
It's very noticeable when magnified. Should I check how far a spline is from straight, in window coordinates, and substitute a line if it isn't?
I am not sure. The code could become cumbersome for not much speedup. I think the most promising next step would be to cache the QPainterPath so that you only have to paint it and not regenerate it. You could use an OpenGL environment to do your drawing so that you can cache everything and only need to modify the painter or view transformation. There is a QOpenGLWidget that might come in handy. Then there is the QGLViewer library, just google it.
Bookmarks