MonobjcMonobjc Documented Class Library
CGBlendMode Enumeration
NamespacesMonobjc.ApplicationServicesCGBlendMode

Compositing operations for images.

Available in Mac OS X v10.4 and later.

Declaration Syntax
C#Visual BasicVisual C++
public enum CGBlendMode
Public Enumeration CGBlendMode
public enum class CGBlendMode
Members
MemberDescription
kCGBlendModeNormal

Paints the source image samples over the background image samples.

Available in Mac OS X v10.4 and later.


kCGBlendModeMultiply

Multiplies the source image samples with the background image samples. This results in colors that are at least as dark as either of the two contributing sample colors.

Available in Mac OS X v10.4 and later.


kCGBlendModeScreen

Multiplies the inverse of the source image samples with the inverse of the background image samples. This results in colors that are at least as light as either of the two contributing sample colors.

Available in Mac OS X v10.4 and later.


kCGBlendModeOverlay

Either multiplies or screens the source image samples with the background image samples, depending on the background color. The result is to overlay the existing image samples while preserving the highlights and shadows of the background. The background color mixes with the source image to reflect the lightness or darkness of the background.

Available in Mac OS X v10.4 and later.


kCGBlendModeDarken

Creates the composite image samples by choosing the darker samples (either from the source image or the background). The result is that the background image samples are replaced by any source image samples that are darker. Otherwise, the background image samples are left unchanged.

Available in Mac OS X v10.4 and later.


kCGBlendModeLighten

Creates the composite image samples by choosing the lighter samples (either from the source image or the background). The result is that the background image samples are replaced by any source image samples that are lighter. Otherwise, the background image samples are left unchanged.

Available in Mac OS X v10.4 and later.


kCGBlendModeColorDodge

Brightens the background image samples to reflect the source image samples. Source image sample values that specify black do not produce a change.

Available in Mac OS X v10.4 and later.


kCGBlendModeColorBurn

Darkens the background image samples to reflect the source image samples. Source image sample values that specify white do not produce a change.

Available in Mac OS X v10.4 and later.


kCGBlendModeSoftLight

Either darkens or lightens colors, depending on the source image sample color. If the source image sample color is lighter than 50% gray, the background is lightened, similar to dodging. If the source image sample color is darker than 50% gray, the background is darkened, similar to burning. If the source image sample color is equal to 50% gray, the background is not changed. Image samples that are equal to pure black or pure white produce darker or lighter areas, but do not result in pure black or white. The overall effect is similar to what you’d achieve by shining a diffuse spotlight on the source image. Use this to add highlights to a scene.

Available in Mac OS X v10.4 and later.


kCGBlendModeHardLight

Either multiplies or screens colors, depending on the source image sample color. If the source image sample color is lighter than 50% gray, the background is lightened, similar to screening. If the source image sample color is darker than 50% gray, the background is darkened, similar to multiplying. If the source image sample color is equal to 50% gray, the source image is not changed. Image samples that are equal to pure black or pure white result in pure black or white. The overall effect is similar to what you’d achieve by shining a harsh spotlight on the source image. Use this to add highlights to a scene.

Available in Mac OS X v10.4 and later.


kCGBlendModeDifference

Subtracts either the source image sample color from the background image sample color, or the reverse, depending on which sample has the greater brightness value. Source image sample values that are black produce no change; white inverts the background color values.

Available in Mac OS X v10.4 and later.


kCGBlendModeExclusion

Produces an effect similar to that produced by kCGBlendModeDifference, but with lower contrast. Source image sample values that are black don’t produce a change; white inverts the background color values.

Available in Mac OS X v10.4 and later.


kCGBlendModeHue

Uses the luminance and saturation values of the background with the hue of the source image.

Available in Mac OS X v10.4 and later.


kCGBlendModeSaturation

Uses the luminance and hue values of the background with the saturation of the source image. Areas of the background that have no saturation (that is, pure gray areas) don’t produce a change.

Available in Mac OS X v10.4 and later.


kCGBlendModeColor

Uses the luminance values of the background with the hue and saturation values of the source image. This mode preserves the gray levels in the image. You can use this mode to color monochrome images or to tint color images.

Available in Mac OS X v10.4 and later.


kCGBlendModeLuminosity

Uses the hue and saturation of the background with the luminance of the source image. This mode creates an effect that is inverse to the effect created by kCGBlendModeColor.

Available in Mac OS X v10.4 and later.


kCGBlendModeClear

R = 0

Available in Mac OS X v10.5 and later.


kCGBlendModeCopy

R = S

Available in Mac OS X v10.5 and later.


kCGBlendModeSourceIn

R = S*Da

Available in Mac OS X v10.5 and later.


kCGBlendModeSourceOut

R = S*(1 - Da)

Available in Mac OS X v10.5 and later.


kCGBlendModeSourceAtop

R = S*Da + D*(1 - Sa)

Available in Mac OS X v10.5 and later.


kCGBlendModeDestinationOver

R = S*(1 - Da) + D

Available in Mac OS X v10.5 and later.


kCGBlendModeDestinationIn

R = D*Sa

Available in Mac OS X v10.5 and later.


kCGBlendModeDestinationOut

R = D*(1 - Sa)

Available in Mac OS X v10.5 and later.


kCGBlendModeDestinationAtop

R = S*(1 - Da) + D*Sa

Available in Mac OS X v10.5 and later.


kCGBlendModeXOR

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.


kCGBlendModePlusDarker

R = MAX(0, (1 - D) + (1 - S))

Available in Mac OS X v10.5 and later.


kCGBlendModePlusLighter

R = MIN(1, S + D)

Available in Mac OS X v10.5 and later.


Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)