1
0
Fork 0

Canvas: add support for stroke-linejoin

This commit is contained in:
Torsten Dreyer 2014-08-26 00:06:59 +02:00
parent 2bce958f39
commit f3058a3f2e
2 changed files with 15 additions and 0 deletions

View file

@ -934,6 +934,16 @@ var Path = {
{
me.set('stroke-linecap', linecap);
},
# Set stroke linejoin
#
# @param linejoin String, "miter", "round" or "bevel"
#
# See http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty for details
setStrokeLineJoin: func(linejoin)
{
me.set('stroke-linejoin', linejoin);
},
# Set stroke dasharray
# Set stroke dasharray
#
# @param pattern Vector, Vector of alternating dash and gap lengths

View file

@ -524,6 +524,11 @@ var parsesvg = func(group, path, options = nil)
if( linecap != nil )
stack[-1].setStrokeLineCap(style['stroke-linecap']);
var linejoin = style['stroke-linejoin'];
if( linejoin != nil )
stack[-1].setStrokeLineJoin(style['stroke-linejoin']);
# http://www.w3.org/TR/SVG/painting.html#StrokeDasharrayProperty
var dash = style['stroke-dasharray'];
if( dash and size(dash) > 3 )