centerArray|kendo.geometry.Point

The center of the gradient.

Coordinates are relative to the shape bounding box. For example [0, 0] is top left and [1, 1] is bottom right.

Example

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

  var gradient = new draw.RadialGradient({
    center: [0.2, 0.8], // Near bottom-left corner
    radius: 0.6,
    stops: [
      { offset: 0, color: "#ffff00", opacity: 1 },
      { offset: 1, color: "#ff8800", opacity: 0.3 }
    ]
  });

  var rect = new geom.Rect([0, 0], [150, 100]);
  var path = draw.Path.fromRect(rect, {
    stroke: { color: "#ccc", width: 1 },
    fill: gradient
  });

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