Instance Method

backingAlignedRect(_:options:)

Returns a backing store pixel-aligned rectangle in local view coordinates.

Declaration

func backingAlignedRect(_ rect: NSRect, options: AlignmentOptions = []) -> NSRect

Parameters

aRect

The rectangle in the view’s interior coordinate system.

options

The alignment options. See AlignmentOptions for possible values. (Note that although the alignment options specify integral values, the rectangle returned by this method is pixel-aligned.)

Return Value

A rectangle in the view’s interior coordinate system that is aligned to the backing store pixels using the specified options.

Discussion

Uses the NSIntegralRectWithOptions(_:_:) function and the given input rectangle and options to produce a backing store pixel-aligned rectangle in the view’s interior coordinates.