anchor([anchor])

Class: Polyline. Method inherited from Shape.

Description:

Sets or gets the anchor position relative to the shape, around which the shape can be rotated using the angle() method.

The default anchor is at the top-left corner of the shape's bounding rectangle (even for non-rectangular shapes).

Parameters:

Name Type Description

[anchor]

Point

Anchor point around which the shape rotates when the rotation angle is not 0.

Returns:

If called without arguments, returns the current anchor; otherwise, returns this shape for method chaining.

Type: Point | this

Also See: