The venerable and ridculously full-featured QPainter has a QPen with both a line cap style and a pen join style, documention of the latter: https://doc.qt.io/qt-6/qt.html#PenJoinStyle-enum
The two have to be different: a cap is a fixed piece of geometry, a join style calculates geometry based on the segments it joins.
Re:Parallel Curves of Cubic Béziers
by JKCalhoun on Saturday September 10, 2022 @06:25AM
(#32789338)
Yeah, the paper made me wonder how the typical modern graphics library even draws stroked béziers. Surely, when the line weight is greater than 1, you have essentially two parallel béziers you are filling in order to rasterize a fat stroke.
You don't need to represent them as curves, though. Yes, turning the parallel curve of a bezier into a smooth curve is difficult, but turning it into a sequence of line segments is pretty easy, and something you can do at whatever level of resolution you want.
For "corners" on non-smooth curves usually there's some kind of way to resolve the degenerate (or rather, undefined) behavior. Usually this would be something like a stroke-cap property.