Instance Method

appendRect(_:)

Appends a rectangular path to the receiver’s path.

Declaration

func appendRect(_ rect: NSRect)

Parameters

aRect

The rectangle describing the path to create.

Discussion

Before adding the rectangle, this method moves the current point to the origin of the rectangle, which implicitly closes the current subpath (if any). The path is constructed by starting at the origin of aRect and adding line segments in a counterclockwise direction. The final segment is added using a close() message.

See Also

Appending Common Shapes to a Path

func append(NSBezierPath)

Appends the contents of the specified path object to the receiver’s path.

func appendPoints(NSPointArray, count: Int)

Appends a series of line segments to the receiver’s path.

func appendOval(in: NSRect)

Appends an oval path to the receiver, inscribing the oval in the specified rectangle.

func appendArc(from: NSPoint, to: NSPoint, radius: CGFloat)

Appends an arc to the receiver’s path.

func appendGlyph(NSGlyph, in: NSFont)

Appends an outline of the specified glyph to the receiver’s path.

Deprecated
func appendGlyphs(UnsafeMutablePointer<NSGlyph>, count: Int, in: NSFont)

Appends the outlines of the specified glyphs to the receiver’s path.

Deprecated
func appendPackedGlyphs(UnsafePointer<Int8>)

Appends an array of packed glyphs to the receiver’s path.

Deprecated
func appendRoundedRect(NSRect, xRadius: CGFloat, yRadius: CGFloat)

Appends a rounded rectangular path to the receiver’s path.