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.

See Also

Converting Coordinate Values

func convertFromBacking(NSPoint)

Converts a point from its pixel aligned backing store coordinate system to the view’s interior coordinate system.

func convertToBacking(NSPoint)

Converts a point from the view’s interior coordinate system to its pixel aligned backing store coordinate system.

func convertFromLayer(NSPoint)

Convert the point from the layer's interior coordinate system to the view’s interior coordinate system.

func convertToLayer(NSPoint)

Convert the size from the view’s interior coordinate system to the layer's interior coordinate system.

func convertFromBacking(NSRect)

Converts a rectangle from its pixel aligned backing store coordinate system to the view’s interior coordinate system.

func convertToBacking(NSRect)

Converts a rectangle from the view’s interior coordinate system to its pixel aligned backing store coordinate system.

func convertFromLayer(NSRect)

Convert the rectangle from the layer's interior coordinate system to the view’s interior coordinate system.

func convertToLayer(NSRect)

Convert the size from the view’s interior coordinate system to the layer's interior coordinate system.

func convertFromBacking(NSSize)

Converts a size from its pixel aligned backing store coordinate system to the view’s interior coordinate system.

func convertToBacking(NSSize)

Converts a size from the view’s interior coordinate system to its pixel aligned backing store coordinate system.

func convertFromLayer(NSSize)

Convert the size from the layer's interior coordinate system to the view’s interior coordinate system.

func convertToLayer(NSSize)

Convert the size from the view’s interior coordinate system to the layer's interior coordinate system.

func convert(NSPoint, from: NSView?)

Converts a point from the coordinate system of a given view to that of the view.

func convert(NSPoint, to: NSView?)

Converts a point from the view’s coordinate system to that of a given view.

func convert(NSSize, from: NSView?)

Converts a size from another view’s coordinate system to that of the view.

func convert(NSSize, to: NSView?)

Converts a size from the view’s coordinate system to that of another view.

func convert(NSRect, from: NSView?)

Converts a rectangle from the coordinate system of another view to that of the view.

func convert(NSRect, to: NSView?)

Converts a rectangle from the view’s coordinate system to that of another view.

func centerScanRect(NSRect)

Converts the corners of a specified rectangle to lie on the center of device pixels, which is useful in compensating for rendering overscanning when the coordinate system has been scaled.