title | page_title |
---|---|
Element |
API reference for Kendo UI Drawing API Element |
An abstract base class representing common members of all drawing elements.
The configuration of this Group.
The clipping path for this element.
The path instance will be monitored for changes. It can be replaced by calling the clip method.
The VML surface (IE 8 and earlier) will clip to the path bounding rectangle.
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var clipPath = new draw.Path();
clipPath.moveTo(0, 0).lineTo(100, 100).lineTo(100, 0).close();
var circle = new draw.Circle(new geom.Circle([100, 100], 80), {
clip: clipPath,
stroke: { color: "red", width: 1 }
});
var surface = draw.Surface.create($("#surface"));
surface.draw(circle);
</script>
The element opacity.
The transformation to apply to this element.
A flag, indicating if the element is visible.
The configuration options of the drawing element.
Returns the bounding box of the element with transformations applied.
kendo.geometry.Rect
The bounding box of the element with transformations applied.
Gets or sets the element clipping path.
The VML surface (IE 8 and earlier) will clip to the path bounding rectangle.
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var circle = new draw.Circle(new geom.Circle([100, 100], 80), {
stroke: { color: "red", width: 1 }
});
var clipPath = new draw.Path();
clipPath.moveTo(0, 0).lineTo(100, 100).lineTo(100, 0).close();
circle.clip(clipPath);
var surface = draw.Surface.create($("#surface"));
surface.draw(circle);
</script>
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var clipPath = new draw.Path();
clipPath.moveTo(0, 0).lineTo(100, 100).lineTo(100, 0).close();
var circle = new draw.Circle(new geom.Circle([80, 80], 60), {
clip: clipPath,
stroke: { color: "red", width: 1 }
});
var surface = draw.Surface.create($("#surface"));
surface.draw(circle);
setTimeout(function() {
circle.clip(null);
}, 2000);
</script>
The element clipping path.
kendo.drawing.Path
The current element clipping path.
Returns the bounding box of the element with clipping and transformations applied.
This is the rectangle that will fit around the actual rendered element.
kendo.geometry.Rect
The bounding box of the element with clipping and transformations applied.
Gets or sets the element opacity.
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var path = new draw.Path();
path.moveTo(0, 0).lineTo(100, 100);
path.opacity(0.5);
var surface = draw.Surface.create($("#surface"));
surface.draw(path);
</script>
The element opacity. Ranges from 0 (completely transparent) to 1 (completely opaque).
Number
The current element opacity.
Gets or sets the transformation of the element.
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var path = new draw.Path();
path.moveTo(0, 0).lineTo(100, 100);
path.transform(geom.transform().scale(2, 1));
var surface = draw.Surface.create($("#surface"));
surface.draw(path);
</script>
The transformation to apply to the element.
kendo.geometry.Transformation
The current transformation on the element.
Gets or sets the visibility of the element.
A flag indicating if the element should be visible.
Boolean
true if the element is visible; false otherwise.