stopsArray

The color stops of the gradient. Can contain either plain objects or GradientStop instances.

Example

<div id="surface" />
<script>
  var draw = kendo.drawing;
  var geom = kendo.geometry;

  var gradient = new draw.RadialGradient({
    center: [0.5, 0.5],
    radius: 0.7,
    stops: [
      { offset: 0, color: "#ff0099", opacity: 1 },
      { offset: 0.3, color: "#9900ff", opacity: 0.9 },
      { offset: 0.7, color: "#0099ff", opacity: 0.7 },
      { offset: 1, color: "#00ff99", opacity: 0.4 }
    ]
  });

  var rect = new geom.Rect([0, 0], [140, 100]);
  var path = draw.Path.fromRect(rect, {
    stroke: null,
    fill: gradient
  });

  var surface = draw.Surface.create($("#surface"));
  surface.draw(path);
</script>
In this article
stops
Not finding the help you need?
Contact Support