Table of Contents

Method GetSprites

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

GetSprites(int, Span<RectFloat>, Span<RectInt32>, Span<ColorRgba128Float>, Span<Matrix3x2Float>)

Retrieves the specified subset of sprites from this sprite batch. For the best performance, use an empty Span (using the C# default keyword, or Span<T>.Empty) for properties that you do not need to retrieve.

void GetSprites(int startIndex, Span<RectFloat> destinationRectangles, Span<RectInt32> sourceRectangles, Span<ColorRgba128Float> colors, Span<Matrix3x2Float> transforms)

Parameters

startIndex int

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

destinationRectangles Span<RectFloat>

When this method returns, contains the destination rectangles for the retrieved sprites.

sourceRectangles Span<RectInt32>

When this method returns, contains the source rectangles for the retrieved sprites. RectInt32.LogicallyInfinite is returned for any sprites that were not assigned a source rectangle.

colors Span<ColorRgba128Float>

When this method returns, contains the colors to be applied to the retrieved sprites. The color { 1, 1, 1, 1 } (opaque white) is returned for any sprites that were not assigned a color.

transforms Span<Matrix3x2Float>

When this method returns, contains the transforms to be applied to the retrived sprites. The identity matrix is returned for any sprites that were not assigned a transform.