Add cap and join style to bezier path.
fdb opened this issue · 1 comments
fdb commented
The BezierPath class should support cap style (butt, round or square) and join style (miter, round, bevel).
NSBezierPath implements cap style and join style, so supporting this is a matter of making the attributes available in the appropriate places:
- The cap style and join style should be context state variables, available under capstyle() and joinstyle()
- The BezierPath should inherit these state variables when creating a new bezier path.
- The BezierPath should have getters / setters for cap style and join style.
- The BezierPath constructor should accept capstyle and joinstyle arguments.
dimitre commented
joinstyle() is working but Path.joinstyle and Path.capstyle are not.
here is the minimum code to reproduce the issue
nofill()
stroke(0)
strokewidth(10)
beginpath(40, 40)
lineto(140, 140)
lineto(280, 140)
path = endpath(draw=False)
#path.capstyle = ROUND
path.joinstyle = ROUND
#joinstyle(ROUND)
drawpath(path)