API Documentation


ZinoSvg is javascript SVG micro-library, a custom wrapper for working with SVG. For examples, check out SVG demo page.


Key Type Required Description
target HTMLElement Yes HTML DOM element where newly created SVG will be inserted.
width number No Width of the SVG document.
height number No Height of the SVG document.


Method Arguments Description
animate api.animate(attr) Animate the last created shape.
append api.append(element) Append the given element to the last created shape.
appendTo api.appendTo(target) Append the last created shape to the given target.
arc api.arc(cx, cy, r, startAngle, endAngle, append) Draw an arc.
attr api.attr(attr) Set attributes to the last created shape.
circle api.circle(cx, cy, r, append) Draw a circle.
cubicCurve api.cubicCurve(c1x, c1y, c2x, c2y, c3x, c3y, x, y, append) Draw a cubic bezier curve.
ellipse api.ellipse(cx, cy, rx, ry, append) Draw an ellipse.
g api.g(append) Draw a group.
getBBox api.getBBox()
getShape api.getShape() Get last created shape.
insert api.insert() Insert shape to the svg document.
line api.line(x1, y1, x2, y2, append) Draw a line.
path api.path(d, append) Draw a path.
polygon api.polygon(points, append) Draw a polygon.
polyline api.polyline(points, append) Draw a polyline.
quadraticCurve api.quadraticCurve(x1, y1, x2, y2, x3, y3, append) Draw a quadratic bezier curve.
rect api.rect(x, y, rx, ry, width, height, append) Draw a rectangle.
text api.text(x, y, text, append) Draw a text.


Event Arguments Description
No events.