Contents

NSWindow.Depth

A type that represents the depth, or amount of memory, for a single pixel in a window or screen.

Declaration

enum Depth

Overview

A depth of 0 indicates default depth. Don’t make window depths persistent because they aren’t the same across systems.

Use the functions colorSpaceName, bitsPerPixel, and isPlanar to extract info from an NSWindowDepth value.

Use NSBestDepth to compute window depths. NSBestDepth tries to accommodate all the parameters (match or better). If there are multiple matches, this function uses color space first, then bits per sample (bps), then planar, then bits per pixel (bpp) to determine the closest match. Use 0 for bpp to indicate the default, the same as the number of bits per plane: either bps or bps * numberOfColorComponents. You may use other values as hints to provide backing stores of different configurations — for instance, 8-bit color.

You can also use one of the explicit bit depths defined in Explicit Window Depth Limits for the NSWindow property depthLimit.

Topics

Constants

Accessing Depth Details

Initializers

See Also

Constants