// ------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// ------------------------------------------------------------------------------
namespace Win32.Graphics.Direct2D;
///
/// ID2D1SpriteBatch
[Guid("4dc583bf-3a10-438a-8722-e9765224f1f1")]
[NativeTypeName("struct ID2D1SpriteBatch : ID2D1Resource")]
[NativeInheritance("ID2D1Resource")]
public unsafe partial struct ID2D1SpriteBatch : ID2D1SpriteBatch.Interface, INativeGuid
{
public static ref readonly Guid IID_ID2D1SpriteBatch
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan data = new byte[] {
0xBF, 0x83, 0xC5, 0x4D,
0x10, 0x3A,
0x8A, 0x43,
0x87,
0x22,
0xE9,
0x76,
0x52,
0x24,
0xF1,
0xF1
};
Debug.Assert(data.Length == Unsafe.SizeOf());
return ref Unsafe.As(ref MemoryMarshal.GetReference(data));
}
}
#if NET6_0_OR_GREATER
static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID2D1SpriteBatch));
#else
public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID2D1SpriteBatch));
#endif
public void** lpVtbl;
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(0)]
public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(1)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(2)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)]
public void GetFactory(ID2D1Factory** factory)
{
((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this), factory);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)]
public HResult AddSprites(uint spriteCount, Win32.Numerics.RectF* destinationRectangles, Win32.Numerics.Rect* sourceRectangles, Color4* colors, Matrix3x2* transforms, uint destinationRectanglesStride, uint sourceRectanglesStride, uint colorsStride, uint transformsStride)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this), spriteCount, destinationRectangles, sourceRectangles, colors, transforms, destinationRectanglesStride, sourceRectanglesStride, colorsStride, transformsStride);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(5)]
public HResult SetSprites(uint startIndex, uint spriteCount, Win32.Numerics.RectF* destinationRectangles, Win32.Numerics.Rect* sourceRectangles, Color4* colors, Matrix3x2* transforms, uint destinationRectanglesStride, uint sourceRectanglesStride, uint colorsStride, uint transformsStride)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this), startIndex, spriteCount, destinationRectangles, sourceRectangles, colors, transforms, destinationRectanglesStride, sourceRectanglesStride, colorsStride, transformsStride);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(6)]
public HResult GetSprites(uint startIndex, uint spriteCount, Win32.Numerics.RectF** destinationRectangles, Win32.Numerics.Rect** sourceRectangles, Color4** colors, Matrix3x2* transforms)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this), startIndex, spriteCount, destinationRectangles, sourceRectangles, colors, transforms);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(7)]
public uint GetSpriteCount()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public void Clear()
{
((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1SpriteBatch*)Unsafe.AsPointer(ref this));
}
public interface Interface : ID2D1Resource.Interface
{
[VtblIndex(4)]
HResult AddSprites(uint spriteCount, Win32.Numerics.RectF* destinationRectangles, Win32.Numerics.Rect* sourceRectangles, Color4* colors, Matrix3x2* transforms, uint destinationRectanglesStride, uint sourceRectanglesStride, uint colorsStride, uint transformsStride);
[VtblIndex(5)]
HResult SetSprites(uint startIndex, uint spriteCount, Win32.Numerics.RectF* destinationRectangles, Win32.Numerics.Rect* sourceRectangles, Color4* colors, Matrix3x2* transforms, uint destinationRectanglesStride, uint sourceRectanglesStride, uint colorsStride, uint transformsStride);
[VtblIndex(6)]
HResult GetSprites(uint startIndex, uint spriteCount, Win32.Numerics.RectF** destinationRectangles, Win32.Numerics.Rect** sourceRectangles, Color4** colors, Matrix3x2* transforms);
[VtblIndex(7)]
uint GetSpriteCount();
[VtblIndex(8)]
void Clear();
}
}