ID2D1DeviceContext::SetPrimitiveBlend method

Changes the primitive blend mode that is used for all rendering operations in the device context.


void SetPrimitiveBlend(
  D2D1_PRIMITIVE_BLEND primitiveBlend




The primitive blend to use.

Return Value

This method does not return a value.


The primitive blend will apply to all of the primitive drawn on the context, unless this is overridden with the compositeMode parameter on the DrawImage API.

The primitive blend applies to the interior of any primitives drawn on the context. In the case of DrawImage, this will be implied by the image rectangle, offset and world transform.

If the primitive blend is anything other than D2D1_PRIMITIVE_BLEND_SOURCE_OVER then ClearType rendering will be turned off. If the application explicitly forces ClearType rendering in these modes, the drawing context will be placed in an error state. D2DERR_WRONG_STATE will be returned from either EndDraw or Flush.


Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1_1.h
DLL D2d1.dll

See Also