ID2D1SpriteBatch::GetSprites method (d2d1_3.h)

Retrieves the specified subset of sprites from this sprite batch. For the best performance, use nullptr for properties that you do not need to retrieve.

Syntax

HRESULT GetSprites(
                  UINT32            startIndex,
                  UINT32            spriteCount,
  [out, optional] D2D1_RECT_F       *destinationRectangles,
  [out, optional] D2D1_RECT_U       *sourceRectangles,
  [out, optional] D2D1_COLOR_F      *colors,
  [out, optional] D2D1_MATRIX_3X2_F *transforms
);

Parameters

startIndex

Type: UINT32

The index of the first sprite in this sprite batch to retrieve.

spriteCount

Type: UINT32

The number of sprites to retrieve.

[out, optional] destinationRectangles

Type: D2D1_RECT_F*

When this method returns, contains a pointer to an array containing the destination rectangles for the retrieved sprites.

[out, optional] sourceRectangles

Type: D2D1_RECT_U*

When this method returns, contains a pointer to an array containing the source rectangles for the retrieved sprites.

The InfiniteRectU is returned for any sprites that were not assigned a source rectangle.

[out, optional] colors

Type: D2D1_COLOR_F*

When this method returns, contains a pointer to an array containing the colors to be applied to the retrieved sprites.

The color {1.0f, 1.0f, 1.0f, 1.0f} is returned for any sprites that were not assigned a color.

[out, optional] transforms

Type: D2D1_MATRIX_3X2_F*

When this method returns, contains a pointer to an array containing the transforms to be applied to the retrieved sprites.

The identity matrix is returned for any sprites that were not assigned a transform.

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

ID2D1SpriteBatch