Table of Contents

Method DrawSpriteBatch

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

DrawSpriteBatch(IDeviceContext, ISpriteBatch, IDeviceBitmap, InterpolationMode, SpriteOptions)

Renders all sprites in the given sprite batch to the device context using the specified drawing options.
NOTE: The antialiasing mode must be set to Aliased.

public static void DrawSpriteBatch(this IDeviceContext deviceContext, ISpriteBatch spriteBatch, IDeviceBitmap bitmap, InterpolationMode interpolationMode, SpriteOptions spriteOptions)

Parameters

deviceContext IDeviceContext

The device context to draw with.

spriteBatch ISpriteBatch
The sprite batch to draw.
bitmap IDeviceBitmap
The bitmap from which the sprites are to be sourced. Each sprite's source rectangle refers to a portion of this bitmap.
interpolationMode InterpolationMode
The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed. This must be NearestNeighbor or Linear./>
spriteOptions SpriteOptions
The additional drawing options, if any, to be used for the sprite batch.