Platforms to show: All Mac Windows Linux Cross-Platform

CGContextMBS constants

Blend Mode Constants

Constant Value Description
kCGBlendModeClear 16 R = 0
Available in Mac OS X v10.5 and later.
kCGBlendModeColor 14
kCGBlendModeColorBurn 7
kCGBlendModeColorDodge 6
kCGBlendModeCopy 17 R = S
Available in Mac OS X v10.5 and later.
kCGBlendModeDarken 4
kCGBlendModeDestinationAtop 24 R = S*(1 - Da) + D*Sa
Available in Mac OS X v10.5 and later.
kCGBlendModeDestinationIn 22 R = D*Sa
Available in Mac OS X v10.5 and later.
kCGBlendModeDestinationOut 23 R = D*(1 - Sa)
Available in Mac OS X v10.5 and later.
kCGBlendModeDestinationOver 21 R = S*(1 - Da) + D
Available in Mac OS X v10.5 and later.
kCGBlendModeDifference 10
kCGBlendModeExclusion 11
kCGBlendModeHardLight 9
kCGBlendModeHue 12
kCGBlendModeLighten 5
kCGBlendModeLuminosity 15
kCGBlendModeMultiply 1
kCGBlendModeNormal 0
kCGBlendModeOverlay 3
kCGBlendModePlusDarker 26 R = MAX(0, (1 - D) + (1 - S))
Available in Mac OS X v10.5 and later.
kCGBlendModePlusLighter 27 R = MIN(1, S + D)
Available in Mac OS X v10.5 and later.
kCGBlendModeSaturation 13
kCGBlendModeScreen 2
kCGBlendModeSoftLight 8
kCGBlendModeSourceAtop 20 R = S*Da + D*(1 - Sa)
Available in Mac OS X v10.5 and later.
kCGBlendModeSourceIn 18 R = S*Da
Available in Mac OS X v10.5 and later.
kCGBlendModeSourceOut 19 R = S*(1 - Da)
Available in Mac OS X v10.5 and later.
kCGBlendModeXOR 25 R = S*(1 - Da) + D*(1 - Sa). This XOR mode is only nominally related to the classical bitmap XOR operation, which is not supported by Quartz 2D.
Available in Mac OS X v10.5 and later.

Interpolation Constants

Constant Value Description
kCGInterpolationDefault 0 Let the context decide.
kCGInterpolationHigh 3 Slower, higher quality.
kCGInterpolationLow 2 Faster, lower quality.
kCGInterpolationMedium 4 A medium level of interpolation quality. This setting is slower than the low setting but faster than the high setting.
Available in Mac OS X v10.6 and later.
kCGInterpolationNone 1 Never interpolate.

💬 Ask a question or report a problem
The biggest plugin in space...