Hi every one ...
I have a simple question,, How can i draw this shape with qpainterPath (lineTo and arcTo)?
ellipse.png
Thanks a lot![]()
Hi every one ...
I have a simple question,, How can i draw this shape with qpainterPath (lineTo and arcTo)?
ellipse.png
Thanks a lot![]()
Starting with the vertical line on the right, create a QPainterPath, move to the lower end of the line, add a line to the upper end of the line, add an arc inside the rectangle of the top arc starting at 0 degrees and ending at 180 degrees, then add a line to the bottom of the left vertical line, and add another arc from 180 degrees to 360 degrees in the bottom arc rectangle. If you want to be able to fill the inside of the shape, close the path.
I'll let you figure out the actual sequence of moveTo(), lineTo() and arcTo() calls.
Bookmarks