CCBlendMode Class Reference

Inherits from NSObject
Declared in CCRendererBasicTypes.h

Overview

Blending modes used with certain node’s blendMode property. CCBlendMode treats blend modes by descriptive name rather than a nondescriptive combination of blend mode identifiers.

Blend Mode Options

  options

Blending options for this mode.

@property (nonatomic, readonly) NSDictionary *options

Declared In

CCRendererBasicTypes.h

Getting a Blend Mode with Options

+ blendModeWithOptions:

Return a cached blending mode with the given options.

+ (CCBlendMode *)blendModeWithOptions:(NSDictionary *)options

Parameters

options

dictionary with blend mode options

Declared In

CCRendererBasicTypes.h

Getting a Built-In Blend Mode

+ disabledMode

Disabled blending mode. Use this with fully opaque surfaces for extra performance.

+ (CCBlendMode *)disabledMode

Declared In

CCRendererBasicTypes.h

+ alphaMode

Regular alpha blending.

+ (CCBlendMode *)alphaMode

Declared In

CCRendererBasicTypes.h

+ premultipliedAlphaMode

Pre-multiplied alpha blending. (This is usually the default)

+ (CCBlendMode *)premultipliedAlphaMode

Declared In

CCRendererBasicTypes.h

+ addMode

Additive blending. (Similar to PhotoShop’s linear dodge mode)

+ (CCBlendMode *)addMode

Declared In

CCRendererBasicTypes.h

+ multiplyMode

Multiply blending mode. (Similar to PhotoShop’s burn mode)

+ (CCBlendMode *)multiplyMode

Declared In

CCRendererBasicTypes.h

+ multiplicativeMode

A (better) multiply blending mode.

+ (CCBlendMode *)multiplicativeMode

Declared In

CCRendererBasicTypes.h

+ addWithAlphaMode

A (better) add mode.

+ (CCBlendMode *)addWithAlphaMode

Declared In

CCRendererBasicTypes.h

+ screenMode

Similar to PhotoShop’s screen mode.

+ (CCBlendMode *)screenMode

Declared In

CCRendererBasicTypes.h

+ dodgeMode

Similar to PhotoShop’s dodge mode.

+ (CCBlendMode *)dodgeMode

Declared In

CCRendererBasicTypes.h