Contents

addLine(to:transform:)

Appends a straight line segment from the current point to the specified point.

Declaration

func addLine(to point: CGPoint, transform: CGAffineTransform = .identity)

Parameters

  • point:

    The location, in user space coordinates, for the end of the new line segment.

  • transform:

    An affine transform to apply to the point before adding to the path. Defaults to the identity transform if not specified.

Discussion

After adding the line segment, the current point is set to the endpoint of the line segment.

See Also

Constructing a Graphics Path