Autodesk Creative Platform Core Version 1.19.0
A broad and deep collection of 2D and 3D capabilities.

Line2D Overview

Inherits Classes: Curve2D

A 2D line respresented by a start point and end point.

See Also: Path2D, Path2D.lineTo

Introduced in Version: 1.1.0

Class Member Summary

Class Member Details

Number distanceTo (point)

Calculates the minimum distance from the line to a given point.
  • point: Point2D - the given point for calculating the distance to

Point2D end

Gets or sets the start point of the line

Line2D move (direction, [y]) | Chainable

Moves the curve in the direction specified.
  • direction: Vector2D or Number or Array [ Number ] - A direction of movement defined by a Vector2D, an Array with 2 values (X and Y), or a number repressenting the X offset.
  • y: Number - The Y offset to move in, when only the X offset is specified as the first argument. | Optional

Point2D start

Gets or sets the start point of the line

Line2D transform (matrix) | Chainable

Transforms the line by a transformation matrix.