// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

namespace Win32.Graphics.DirectWrite;

/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget2"]/*' />
/// <unmanaged>IDWriteBitmapRenderTarget2</unmanaged>
[Guid("c553a742-fc01-44da-a66e-b8b9ed6c3995")]
[NativeTypeName("struct IDWriteBitmapRenderTarget2 : IDWriteBitmapRenderTarget1")]
[NativeInheritance("IDWriteBitmapRenderTarget1")]
public unsafe partial struct IDWriteBitmapRenderTarget2 : IDWriteBitmapRenderTarget2.Interface, INativeGuid
{
	public static ref readonly Guid IID_IDWriteBitmapRenderTarget2
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0x42, 0xA7, 0x53, 0xC5,
				0x01, 0xFC,
				0xDA, 0x44,
				0xA6,
				0x6E,
				0xB8,
				0xB9,
				0xED,
				0x6C,
				0x39,
				0x95
			};

			Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
			return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
		}
	}

	static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IDWriteBitmapRenderTarget2));

	public void** lpVtbl;

	/// <inheritdoc cref="IUnknown.QueryInterface" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(0)]
	public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, Guid*, void**, int>)(lpVtbl[0]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), riid, ppvObject);
	}

	/// <inheritdoc cref="IUnknown.AddRef" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(1)]
	[return: NativeTypeName("ULONG")]
	public uint AddRef()
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, uint>)(lpVtbl[1]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IUnknown.Release" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	[return: NativeTypeName("ULONG")]
	public uint Release()
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, uint>)(lpVtbl[2]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.DrawGlyphRun" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public HResult DrawGlyphRun(float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode, GlyphRun* glyphRun, IDWriteRenderingParams* renderingParams, uint textColor, Rect* blackBoxRect)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, float, float, MeasuringMode, GlyphRun*, IDWriteRenderingParams*, uint, Rect*, int>)(lpVtbl[3]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), baselineOriginX, baselineOriginY, measuringMode, glyphRun, renderingParams, textColor, blackBoxRect);
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.GetMemoryDC" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public IntPtr GetMemoryDC()
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, IntPtr>)(lpVtbl[4]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.GetPixelsPerDip" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public float GetPixelsPerDip()
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, float>)(lpVtbl[5]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.SetPixelsPerDip" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(6)]
	public HResult SetPixelsPerDip(float pixelsPerDip)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, float, int>)(lpVtbl[6]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), pixelsPerDip);
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.GetCurrentTransform" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(7)]
	public HResult GetCurrentTransform(Matrix3x2* transform)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, Matrix3x2*, int>)(lpVtbl[7]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), transform);
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.SetCurrentTransform" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(8)]
	public HResult SetCurrentTransform(Matrix3x2* transform)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, Matrix3x2*, int>)(lpVtbl[8]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), transform);
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.GetSize" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(9)]
	public HResult GetSize(System.Drawing.Size* size)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, System.Drawing.Size*, int>)(lpVtbl[9]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), size);
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.Resize" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(10)]
	public HResult Resize(uint width, uint height)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, uint, uint, int>)(lpVtbl[10]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), width, height);
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget1.GetTextAntialiasMode" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(11)]
	public TextAntialiasMode GetTextAntialiasMode()
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, TextAntialiasMode>)(lpVtbl[11]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IDWriteBitmapRenderTarget1.SetTextAntialiasMode" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(12)]
	public HResult SetTextAntialiasMode(TextAntialiasMode antialiasMode)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, TextAntialiasMode, int>)(lpVtbl[12]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), antialiasMode);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget2::GetBitmapData"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(13)]
	public HResult GetBitmapData(BitmapDataBgra32* bitmapData)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget2*, BitmapDataBgra32*, int>)(lpVtbl[13]))((IDWriteBitmapRenderTarget2*)Unsafe.AsPointer(ref this), bitmapData);
	}

	public interface Interface : IDWriteBitmapRenderTarget1.Interface
	{
		[VtblIndex(13)]
		HResult GetBitmapData(BitmapDataBgra32* bitmapData);
	}
}

