opacity
Gets or sets the element opacity. Inherited from Element.opacity
If set, the stroke and fill opacity will be multiplied by the element opacity.
Parameters
opacity Number
The element opacity. Ranges from 0 (completely transparent) to 1 (completely opaque).
Returns
Number
The current element opacity.
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("navy", 2)
.fill("skyblue");
var surface = draw.Surface.create($("#surface"));
surface.draw(circle);
// Get current opacity
console.log("Current opacity:", circle.opacity());
// Set new opacity
circle.opacity(0.5);
console.log("New opacity:", circle.opacity());
</script>
In this article