Table of Contents

Class DeviceContext3

Namespace
SharpDX.Direct2D1
Assembly
SharpDX.Direct2D1.dll
[Guid("235a7496-8351-414c-bcd4-6672ab2d8e00")]
public class DeviceContext3 : DeviceContext2
Inheritance
DeviceContext3
Derived
Inherited Members

Constructors

DeviceContext3(Device3, DeviceContextOptions)

Initializes a new instance of the DeviceContext3 class using an existing Device3.

public DeviceContext3(Device3 device, DeviceContextOptions options)

Parameters

device Device3

The device.

options DeviceContextOptions

The options to be applied to the created device context.

Remarks

The new device context will not have a selected target bitmap. The caller must create and select a bitmap as the target surface of the context.

DeviceContext3(nint)

public DeviceContext3(nint nativePtr)

Parameters

nativePtr nint

Methods

DrawSpriteBatch(SpriteBatch, int, int, Bitmap, BitmapInterpolationMode, SpriteOptions)

Renders all sprites in the given sprite batch to the device context using the specified drawing options.

public void DrawSpriteBatch(SpriteBatch spriteBatch, int startIndex, int spriteCount, Bitmap bitmap, BitmapInterpolationMode interpolationMode, SpriteOptions spriteOptions)

Parameters

spriteBatch SpriteBatch

The sprite batch to draw.

startIndex int

The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.

spriteCount int

The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.

bitmap Bitmap

The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.

interpolationMode BitmapInterpolationMode

The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.

spriteOptions SpriteOptions

The additional drawing options, if any, to be used for this sprite batch.

Operators

explicit operator DeviceContext3(nint)

public static explicit operator DeviceContext3(nint nativePtr)

Parameters

nativePtr nint

Returns

DeviceContext3