Contents

NSCompositingOperation

Constants that describe compositing operators in terms of source and destination images, each having an opaque and transparent region.

Declaration

enum NSCompositingOperation

Overview

The type of operation, the source image, and the destination image determine the final output.

These compositing operators are defined in and used by compositeToPoint:fromRect:operation:, compositeToPoint:operation:, compositeToPoint:fromRect:operation:fraction:, compositeToPoint:operation:fraction:, draw(at:from:operation:fraction:), and draw(in:from:operation:fraction:). They are also used by drawing methods in other classes that take a compositing operator.

The equations after each constant represent the mathematical formulas for calculating the color value of the resulting pixel. The table below lists the meaning of each placeholder value in the equations.

Placeholder

Meaning

R

The premultiplied result color.

S

The source color.

D

The destination color.

Sa

The alpha value of the source color.

Da

The alpha value of the destination color.

Topics

Operations for Compositing

Initializers

See Also

Configuring Rendering Options