point2(x, [y])

Class: Line.

Description:

Sets or gets the second point of the line.

Parameters:

Name Type Description

x

number | Object

X coordinate of the point, or an object with X and Y coordinates {x: number, y: number}.

[y]

number

Y coordinate of the point (required only if x parameter is a number).

Returns:

If called without parameters, returns current point; otherwise returns this Line shape for chaining.

Type: Line | Point