QPainterPath line to curve
I have drawn a straight line using QPainterPath.
BD is a straightline. Now I have to modify this line to a curve so that BD length become 100 pixel. Stright line BD length is only 50. so the line has bend startpoint B and endpoint D remains same but it should match the length to be 100.
Please help me how can I do it.? Thanks Sujan
Will "quadTo":http://qt-project.org/doc/qt-5.0/qtgui/qpainterpath.html#quadTo help you? But don't know how to make the curve exactly 100 pixels.
basically it's the following:
The hard part is doing the math to "calculate the arc length":http://en.wikipedia.org/wiki/Curve_length and the control point.
how can we control the length of the curve drawn.
I have a length of 100 my curve should be a length of 100. how can we give this as input and find the control point.