title | page_title |
---|---|
Segment |
API reference for Kendo UI Drawing API Segment |
Defines a path segment with an anchor point and optional curve control points.
Segments are created implicitly by the Path lineTo and curveTo commands.
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var path = new draw.Path()
.moveTo(100, 100) // Creates segment #0
.lineTo(200, 100) // Creates segment #1
.stroke("red", 1);
// Moves the line starting point 50px to the left
path.segments[0].anchor().translate(50, 0);
var surface = draw.Surface.create($("#surface"));
surface.draw(path);
</script>
The anchor point of this segment.
If no control points are defined the path will pass through this point.
The first curve control point of this segment, if any.
The second curve control point of this segment, if any.
Gets or sets the segment anchor point.
The setter returns the current Segment to allow chaining.
The new anchor point.
kendo.geometry.Point
The current anchor point.
Gets or sets the first curve control point of this segment.
The setter returns the current Segment to allow chaining.
The new control point.
kendo.geometry.Point
The current control point.
Gets or sets the second curve control point of this segment.
The setter returns the current Segment to allow chaining.
The new control point.
kendo.geometry.Point
The current control point.