ericdrowell/KineticJS — pull request #158 by macfreek (2012-11-15 22:11:01+00:00)
Title: Lines with rounded corners

So far only rects could have rounded corners. It would be great if lines could also have rounded corners.

Please discuss this patch before merging the code.

This patch is very simple (only two lines) and effective for most scenarios. However, it has three disadvantages:
# It uses arcTo() which is tagged as "problematic in Opera" elsewhere in this library.
# it does not yet correct for very acute angles, where the radius must be decreased for the rounding to fit.
# It is not possible to combine dashed lines with rounded corners

I'm willing to write code that resolves the first two issues, but be aware that this is computationally intensive, so I like some feedback if you are willing to merge such a patch before writing it. As for the third item, I'm sure I can write the code to support both rounded corners and dashes lines, but that really is a mayor effort.

Currently, I'm only interested in rounded corners for lines, and am willing to write that code. Do you want support for other type of shapes too, and if so -- which shapes would you consider?