fromRect
Create a straight path from the given rectangle.
Example
<div id="surface" style="width: 250px; height: 250px;"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var rect = new geom.Rect([50, 50], [150, 100]);
var path = draw.Path.fromRect(rect, {
stroke: {
color: "#9b59b6",
width: 2
},
fill: {
color: "#ecf0f1"
}
});
var surface = draw.Surface.create($("#surface"));
surface.draw(path);
</script>
Parameters
rect kendo.geometry.Rect
The source rectangle to trace.
options Object
optional
The configuration options for the path.
Returns
kendo.drawing.Path
The newly constructed path.
In this article