Table of Contents

Method BlendImage

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

BlendImage(IDeviceImage, BlendMode, Point2Float?, in RectFloat?, InterpolationMode)

Draws an image to the device context using the specified blend mode. Results are equivalent to using Direct2D's built-in Blend effect.

void BlendImage(IDeviceImage image, BlendMode blendMode, Point2Float? targetOffset = null, in RectFloat? imageRect = null, InterpolationMode interpolationMode = InterpolationMode.Linear)

Parameters

image IDeviceImage

The image to be drawn to the device context.

blendMode BlendMode

The blend mode to be used. See BlendMode and Direct2D Blend effect for more info.

targetOffset Point2Float?

The offset in the destination space that the image will be rendered to. The entire logical extent of the image will be rendered to the corresponding destination. If not specified, the destination origin will be (0, 0). The top-left corner of the image will be mapped to the target offset. This will not necessarily be the origin. The default value is null.

imageRect RectFloat?

The corresponding rectangle in the image space will be mapped to the given origins when processing the image. The default value is null.

interpolationMode InterpolationMode

The interpolation mode that will be used to scale the image if necessary. The default value is Linear.