translate

Sets translation with the specified parameters.

Parameters

x Number

The distance to translate along the X axis.

y Number

The distance to translate along the Y axis.

Returns

kendo.geometry.Transformation The current transformation instance.

Example

<script>
var geom = kendo.geometry;
var transform = geom.transform();

// Translate by 50 pixels right and 30 pixels down
transform.translate(50, 30);

// Chain with other transformations
var combinedTransform = geom.transform()
    .translate(100, 50)
    .scale(2, 2)
    .rotate(45, [0, 0]);

console.log('Translation applied');
console.log('Matrix translation values:', transform.matrix().e, transform.matrix().f);
</script>

kendo.geometry.Transformation The current transformation instance.

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