Table of Contents

Enum CompositeMode

Namespace
SharpDX.Direct2D1
Assembly
SharpDX.Direct2D1.dll

Used to specify the blend mode for all of the Direct2D blending operations.

public enum CompositeMode

Fields

BoundedSourceCopy = 11

Equivalent to D2D1_COMPOSITE_MODE_SOURCE_COPY, but pixels outside of the source bounds are unchanged.

DestinationAtop = 7

The logical inverse of D2D1_COMPOSITE_MODE_SOURCE_ATOP.

DestinationIn = 3

The inverse of the D2D1_COMPOSITE_MODE_SOURCE_IN operation.

DestinationOut = 5

The is the logical inverse to D2D1_COMPOSITE_MODE_DESTINATION_IN.

DestinationOver = 1

The destination is rendered over the source.

MaskInvert = 12

Destination colors are inverted according to a source mask.

Plus = 9

The channel components are summed.

SourceAtop = 6

Writes the source pixels over the destination where there are destination pixels.

SourceCopy = 10

The source is copied to the destination; the destination pixels are ignored.

SourceIn = 2

Performs a logical clip of the source pixels against the destination pixels.

SourceOut = 4

This is the logical inverse to D2D1_COMPOSITE_MODE_SOURCE_IN.

SourceOver = 0

The standard source-over-destination blend mode.

Xor = 8

The source is inverted with the destination.

Remarks

The figure here shows an example of each of the modes with images that have an opacity of 1.0 or 0.5.

There can be slightly different interpretations of these enumeration values depending on where the value is used.

  • With a composite effect:

    D2D1_COMPOSITE_MODE_DESTINATION_COPY is equivalent to D2D1_COMPOSITE_MODE_SOURCE_COPY with the inputs inverted.
  • As a parameter to ID2D1DeviceContext::DrawImage:

    D2D1_COMPOSITE_MODE_DESTINATION_COPY is a no-op since the destination is already in the selected target.