Windows Dev Center

ID2D1DeviceContext::SetPrimitiveBlend method

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

Syntax


void SetPrimitiveBlend(
   D2D1_PRIMITIVE_BLEND primitiveBlend
);

Parameters

primitiveBlend

Type: D2D1_PRIMITIVE_BLEND

The primitive blend to use.

Return value

This method does not return a value.

Remarks

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.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1DeviceContext
D2D1_PRIMITIVE_BLEND

 

 

Show:
© 2015 Microsoft