transform
Gets or sets the transformation of the element. Inherited from Element.transform
Example
<div id="surface" style="width: 250px; height: 250px;"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var path = new draw.Path({
stroke: {
color: "#9b59b6",
width: 3
},
fill: {
color: "#ecf0f1"
}
})
.moveTo(50, 50)
.lineTo(150, 50)
.lineTo(150, 150)
.lineTo(50, 150)
.close();
// Apply transformation using the transform method
var transformation = geom.transform()
.rotate(45, [100, 100])
.scale(1.5, 1.5);
path.transform(transformation);
console.log("Current transformation:", path.transform());
var surface = draw.Surface.create($("#surface"));
surface.draw(path);
</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