Table of Contents

Method DrawImage

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.Core.dll

DrawImage(IDeviceContext, IDeviceImage, RectFloat, in RectFloat?, InterpolationMode, CompositeMode)

Draws the image, fitting the given imageRect from the image to the given targetRect on the device context. If null is passed for imageRect then the whole image is used, and it is also required that the image has a finite extent (which is calculated by calling IDeviceContext.GetImageLocalBounds()). If the image has an infinite extent, the results are undefined and may or may not cause an exception to be thrown.

public static void DrawImage(this IDeviceContext deviceContext, IDeviceImage image, RectFloat targetRect, in RectFloat? imageRect = null, InterpolationMode interpolationMode = InterpolationMode.Linear, CompositeMode compositeMode = CompositeMode.SourceOver)

Parameters

deviceContext IDeviceContext
image IDeviceImage
targetRect RectFloat
imageRect RectFloat?
interpolationMode InterpolationMode
compositeMode CompositeMode