ID2D1RenderTarget::Clear method

Clears the drawing area to the specified color.

Syntax


virtual void Clear(
  [in, optional] const D2D1_COLOR_F *clearColor = NULL
) = 0;

Parameters

clearColor [in, optional]

Type: const D2D1_COLOR_F*

The color to which the drawing area is cleared, or NULL for transparent black.

Return value

This method does not return a value.

Remarks

Direct2D interprets the clearColor as straight alpha (not premultiplied). If the render target's alpha mode is D2D1_ALPHA_MODE_IGNORE, the alpha channel of clearColor is ignored and replaced with 1.0f (fully opaque).

If the render target has an active clip (specified by PushAxisAlignedClip), the clear command is applied only to the area within the clip region.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

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

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1RenderTarget

 

 

Show: