end
Gets or sets the end point of the gradient.
Example
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var gradient = new draw.LinearGradient({
start: [0, 0],
end: [1, 0],
stops: [
{ offset: 0, color: "#ff6600" },
{ offset: 1, color: "#ffcc00" }
]
});
// Get the current end point
console.log("Current end point:", gradient.end());
// Change the end point to create a vertical gradient
gradient.end([0, 1]);
console.log("New end point:", gradient.end());
var rect = new geom.Rect([10, 10], [150, 150]);
var path = draw.Path.fromRect(rect, {
fill: gradient,
stroke: { color: "#000000", width: 1 }
});
var surface = draw.Surface.create($("#surface"));
surface.draw(path);
</script>
Parameters
end Array|kendo.geometry.Point
The end point of the gradient.
Coordinates are relative to the shape bounding box. For example [0, 0] is top left and [1, 1] is bottom right.
Returns
kendo.geometry.Point The current end point of the gradient.