ID2D1CommandSink3::DrawSpriteBatch method (d2d1_3.h)

Renders part or all of the given sprite batch to the device context using the specified drawing options.

Syntax

HRESULT DrawSpriteBatch(
  [in] ID2D1SpriteBatch               *spriteBatch,
       UINT32                         startIndex,
       UINT32                         spriteCount,
  [in] ID2D1Bitmap                    *bitmap,
       D2D1_BITMAP_INTERPOLATION_MODE interpolationMode,
       D2D1_SPRITE_OPTIONS            spriteOptions
);

Parameters

[in] spriteBatch

Type: ID2D1SpriteBatch*

The sprite batch to draw.

startIndex

Type: UINT32

The index of the first sprite in the sprite batch to draw.

spriteCount

Type: UINT32

The number of sprites to draw.

[in] bitmap

Type: ID2D1Bitmap*

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

interpolationMode

Type: D2D1_BITMAP_INTERPOLATION_MODE

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

Type: D2D1_SPRITE_OPTIONS

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

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Target Platform Windows
Header d2d1_3.h
Library D2d1.lib
DLL D2d1.dll

See also

ID2D1CommandSink3