Method Clear
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
Clear(in ColorRgba128Float?)
Clears the drawing area to the specified color.
void Clear(in ColorRgba128Float? clearColor = null)
Parameters
clearColor
ColorRgba128Float?The color to which the drawing area is cleared. If null, the color will be transparent black.
Remarks
Direct2D interprets the clearColor as straight alpha (not premultiplied). If the render target's alpha mode is 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.
If null is used for the clearColor, and the current target is an ICommandList, the bounds as returned by GetImageLocalBounds(IDeviceImage)
and GetImageWorldBounds(IDeviceImage) will be an empty rectangle. Using non-null will result in the rectangle being infinite.