I need a very simple example how to connect QPointF with curves
-
Hello, I have a QList of QPoints which I need to connect with curves and lines. Can you point me the simpliest way to do this, and one important thing, is the line drawn between collision detectable? Thanks in advance.
P.S. I am usign QGraphics* all things -
Hi heatblazer.
I might be wrong but are you looking for something like "this"?:http://qt-project.org/doc/qt-4.8/qpainterpath.html#details
I have used QPainterPath to create curves and lines and then render them using QPainter.
-
Connecting all the dots with straight lines is trival. Fitting curves through them is not. The curves that Qt provides use control points (standard bezier stuff), but do not do curve fitting (finding a curve that goes through the provided points). If you need that, you will need to do your own math algorithms for that.