New to Kendo UI for jQueryStart a free 30-day trial

Create

class methods

Creates a drawing surface matching the browser capabilities.

Parameters:elementjQuery|Element

The DOM (or jQuery) element that will host the surface.

Returns:kendo.drawing.Surface

An implementation matching the browser capabilities or caller preference; undefined if none is available.

<div id="container"></div>
<script>
    var draw = kendo.drawing;
    var surface = draw.Surface.create($("#container"), {
        type: "canvas",
        width: "600px",
        height: "400px"
    });

    var path = new draw.Path().fill("red")
        .moveTo(50, 0).lineTo(100, 50).lineTo(0, 50).close();

    surface.draw(path);
</script>
Not finding the help you need?
Contact Support