fill

Sets the shape fill.

Parameters

color String

The fill color to set.

opacity Number optional

The fill opacity to set.

Returns

kendo.drawing.Circle The current instance to allow chaining.

Example

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

    var circleGeometry = new geom.Circle([100, 100], 30);
    var circle = new draw.Circle(circleGeometry).stroke("black", 2);

    var surface = draw.Surface.create($("#surface"));
    surface.draw(circle);

    // Set fill color and opacity using the fill method
    circle.fill("teal", 0.6);

    // Chain multiple operations
    setTimeout(() => {
        circle.fill("gold", 0.8).stroke("darkgoldenrod", 3);
    }, 2000);
</script>
In this article
fill
Not finding the help you need?
Contact Support