Canvas: add support for stroke-linejoin
This commit is contained in:
parent
2bce958f39
commit
f3058a3f2e
2 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Add table
Reference in a new issue