Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.0
-
None
-
Qt5 on 64-bit Linux
-
82b21536e72a640699594b3e82a5a6182a95521c
Description
I was trying to implement a half-rounded rectangle (rounded on the top two corners, flat on the bottom). After some frustration trying to guess how arcTo would work, I went looking for a rounded rectangle Canvas tutorial and found this:
http://www.dbp-consulting.com/tutorials/canvas/CanvasArcTo.html
So I will attach a simplified HTML example and a QML example, which both use the exact same code to try to render a fully-rounded rectangle. If you run the QML example with the master branch Qt5 it doesn't render correctly (I will attach screenshots too).
The trouble with using arc() rather than arcTo() is when trying to create a closed shape, so that both filling and stroking will work, arc() does not move the "current point" in the context; the next line segment will continue from where the arc started rather than where it ended. That may or may not be a bug, but then we really need arcTo() to be functional to be able to create closed paths with rounded segments.