Instance Method

convertFromBacking(_:)

Converts a rect from its pixel aligned backing store coordinate system to the window’s coordinate system.

Declaration

func convertFromBacking(_ rect: NSRect) -> NSRect

Parameters

rect

The rect in the pixel backing store aligned coordinate system.

Return Value

A rect in the window’s coordinate system.

See Also

Converting Coordinates

var backingScaleFactor: CGFloat

The backing scale factor.

func backingAlignedRect(NSRect, options: AlignmentOptions) -> NSRect

Returns a backing store pixel aligned rectangle in window coordinates.

func convertToBacking(NSRect) -> NSRect

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

func convertToScreen(NSRect) -> NSRect

Converts the rectangle to the screen coordinate system from the window’s coordinate system.

func convertFromScreen(NSRect) -> NSRect

Converts the rectangle from the screen coordinate system to the window’s coordinate system