Contents

CGDisplayBlendFraction

The percentage of blend color used in a fade operation.

Declaration

typealias CGDisplayBlendFraction = Float

Discussion

The blend fraction ranges from 0 (no color) to 1 (full intensity). If you specify 0, the blend color is not applied. If you specify 1, the user sees only the blend color on the screen.

In a fade operation, Quartz blends a color specified by the application with the current contents of the framebuffer. The blend color can be applied both at the beginning and at the end of a fade operation.

Color blending during a fade operation is analogous to alpha blending in Quartz 2D, and the appearance is similar. However, the implementation is quite different. In a fade operation, the blend color is applied at the very end of the graphics pipeline, when the framebuffer is transferred to video output.

For example, the Universal Access preference panel in macOS allows you to select a flashing screen effect (sometimes called a visual bell) to accompany the system alert sound. When you select this option, the system uses a Quartz fade operation to produce the flash. The blend color is applied using a blend fraction of 0.5 or 50%.

See Also

Data Types