exportSVG
Exports a group of drawing elements as an SVG document.
The group will be positioned at [0, 0] in the exported file. It's dimensions will be used as default dimensions for the image.
The export operation is asynchronous and returns a promise.
The promise will be resolved with a SVG document encoded as a Data URI.
Parameters
group kendo.drawing.Group
The root group containing all elements to export.
options Object
optionalExport options.
options.raw Boolean
(default: false)Resolves the promise with the raw SVG document without the Data URI prefix.
ReturnsPromise
A promise that will be resolved with a SVG document encoded as a Data URI.
Example - Exporting a drawing to an SVG document
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var rect = new geom.Rect([5, 5], [240, 240]);
var path = draw.Path.fromRect(rect).stroke("red", 5);
var root = new draw.Group();
root.append(path);
draw.exportSVG(root).done(function(data) {
kendo.saveAs({
dataURI: data,
fileName: "frame.svg"
});
});
</script>