The modes that describe how the source and destination pixel colors are used to calculate the new destination color.


enum SKBlendMode : Int



case alpha

The source and destination colors are blended by multiplying the source alpha value.

case add

The source and destination colors are added together.

case subtract

The source color is subtracted from the destination color.

case multiply

The source color is multiplied by the destination color.

case multiplyX2

The source color is multiplied by the destination color and then doubled.

case screen

The source color is added to the destination color times the inverted source color.

case replace

The source color replaces the destination color.

Enumeration Cases

See Also

Configuring Alpha Blendling

Blending a Sprite with Different Interpretations of Alpha

Reinterpret a sprite's alpha property to react differently to the objects below it.

var blendMode: SKBlendMode

The blend mode used to draw the sprite into the parent’s framebuffer.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software