ID2D1SpriteBatch::GetSprites method

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 = NULL,
  [out, optional] D2D1_RECT_U       *sourceRectangles = NULL,
  [out, optional] D2D1_COLOR_F      *colors = NULL,
  [out, optional] D2D1_MATRIX_3X2_F *transforms = NULL
);

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.

destinationRectangles [out, optional]

Type: D2D1_RECT_F*

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

sourceRectangles [out, optional]

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.

colors [out, optional]

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.

transforms [out, optional]

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

Header

D2d1_3.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1SpriteBatch

 

 

Show: