SVG Square
This is part of the SVG Tutorial and exercises drawing square in SVG.
Actually a square is just a rectangular where all the 4 sides are the same length, but the color is much nicer here.
examples/js/svg_square.js
function draw_square() { var draw = SVG('square_1'); draw.size(120, 120); var square = draw.rect(100, 100); square.attr({ fill: '#f06' }); } draw_square()
Published on 2015-02-14
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post