svg - Fill a path node in Draw2d touch -
im trying make arrow joining rect , path (triangle). code:
var svgcarga = [ '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">', '<rect opacity="0" height="50" width="50" y="0" x="0" stroke-width="0" stroke="#000" fill="#fff"/>', '<rect stroke="#000" height="29.875" width="4" y="6.3125" x="23" stroke-width="0" fill="#000000"/>', '<path fill="#000000" stroke="#000" d="m17.41375,36.090939l7.4375,10l7.4375,-10l-14.875,0z" stroke-width="1"/>', '</svg>', ].join(); carga = draw2d.svgfigure.extend({ name: 'carga', init: function() { this._super(); this.width = 65; this.height = 65; }, getsvg: function() { return svgcarga; } }); as can see, path has attribute: fill="#000000" when rendered shows fill="none"... if change attribute manually, shows path filled.

i don't know want exactly.
i think can't fill svg path in draw2d (keep in mind svgfigure import limited)
'<path fill="#000000" stroke="#000" d="m17.41375,36.090939l7.4375,10l7.4375,-10l-14.875,0z" stroke-width="1"/>' you can use polygon that, this:
'<polygon points="25,45 15,35 35,35" fill="#000000" stroke="#000" stroke-width="1" />' hope it's want :)
reference:
http://draw2d.org/draw2d_touch/jsdoc_5/#!/guide/extending_svg_figure
Comments
Post a Comment