optionsObject
The configuration of this RadialGradient.
Example
<div id="surface" />
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var options = {
center: [0.5, 0.5],
radius: 0.8,
stops: [
{ offset: 0, color: "#ff0000", opacity: 1 },
{ offset: 0.5, color: "#00ff00", opacity: 0.8 },
{ offset: 1, color: "#0000ff", opacity: 0.6 }
]
};
var gradient = new draw.RadialGradient(options);
var rect = new geom.Rect([0, 0], [120, 80]);
var path = draw.Path.fromRect(rect, {
stroke: null,
fill: gradient
});
var surface = draw.Surface.create($("#surface"));
surface.draw(path);
</script>
In this article