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
deviceContextIDeviceContextThe device context to draw with.
spriteBatchISpriteBatch- The sprite batch to draw.
bitmapIDeviceBitmap- The bitmap from which the sprites are to be sourced. Each sprite's source rectangle refers to a portion of this bitmap.
interpolationModeInterpolationMode- 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./>
spriteOptionsSpriteOptions- The additional drawing options, if any, to be used for the sprite batch.