transform

Gets or sets the transformation of the element. Inherited from Element.transform

Example - setting and getting transformation

<div id="surface" style="width: 250px; height: 250px;"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    var multiPath = new draw.MultiPath()
        .moveTo(50, 50).lineTo(150, 50).lineTo(100, 100).close()
        .moveTo(100, 150).lineTo(200, 150).lineTo(150, 200).close();

    multiPath.fill("orange");

    // Apply rotation transformation
    var transformation = geom.transform().rotate(30, [125, 125]);
    multiPath.transform(transformation);

    // Get current transformation
    var currentTransform = multiPath.transform();
    console.log("Transform applied: " + (currentTransform !== null));

    var surface = draw.Surface.create($("#surface"));
    surface.draw(multiPath);
</script>

Parameters

transform kendo.geometry.Transformation

The transformation to apply to the element.

Returns

kendo.geometry.Transformation The current transformation on the element.

In this article
transform
Not finding the help you need?
Contact Support