GpCompositingMode enumeration

Selects how a drawn colour is combined with the colour already on the surface.

The setting is the CompositingMode property of Graphics. It matters only for colours that are not fully opaque.

Note

Text drawn with ClearType cannot be combined with CompositingModeSourceCopy: DrawString returns InvalidParameter and draws nothing. That is the hint TextRenderingHintClearTypeGridFit and, when Windows smooths fonts with ClearType, which is its default setting, also TextRenderingHintSystemDefault. The other four hints draw. This is a limit of GDI+.

Member Value Description
CompositingModeSourceOver 0 The drawn colour is blended with the background according to its alpha value.
CompositingModeSourceCopy 1 The drawn colour replaces the background colour, alpha value included.

Used by

See Also