// ------------------------------------------------------------------------------
// <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="IDWriteBitmapRenderTarget3"]/*' />
/// <unmanaged>IDWriteBitmapRenderTarget3</unmanaged>
[Guid("aeec37db-c337-40f1-8e2a-9a41b167b238")]
[NativeTypeName("struct IDWriteBitmapRenderTarget3 : IDWriteBitmapRenderTarget2")]
[NativeInheritance("IDWriteBitmapRenderTarget2")]
public unsafe partial struct IDWriteBitmapRenderTarget3 : IDWriteBitmapRenderTarget3.Interface, INativeGuid
{
	public static ref readonly Guid IID_IDWriteBitmapRenderTarget3
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0xDB, 0x37, 0xEC, 0xAE,
				0x37, 0xC3,
				0xF1, 0x40,
				0x8E,
				0x2A,
				0x9A,
				0x41,
				0xB1,
				0x67,
				0xB2,
				0x38
			};

			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_IDWriteBitmapRenderTarget3));

	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]<IDWriteBitmapRenderTarget3*, Guid*, void**, int>)(lpVtbl[0]))((IDWriteBitmapRenderTarget3*)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]<IDWriteBitmapRenderTarget3*, uint>)(lpVtbl[1]))((IDWriteBitmapRenderTarget3*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IUnknown.Release" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	[return: NativeTypeName("ULONG")]
	public uint Release()
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget3*, uint>)(lpVtbl[2]))((IDWriteBitmapRenderTarget3*)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]<IDWriteBitmapRenderTarget3*, float, float, MeasuringMode, GlyphRun*, IDWriteRenderingParams*, uint, Rect*, int>)(lpVtbl[3]))((IDWriteBitmapRenderTarget3*)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]<IDWriteBitmapRenderTarget3*, IntPtr>)(lpVtbl[4]))((IDWriteBitmapRenderTarget3*)Unsafe.AsPointer(ref this));
	}

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

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

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

	/// <inheritdoc cref="IDWriteBitmapRenderTarget.SetCurrentTransform" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(8)]
	public HResult SetCurrentTransform(Matrix3x2* transform)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget3*, Matrix3x2*, int>)(lpVtbl[8]))((IDWriteBitmapRenderTarget3*)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]<IDWriteBitmapRenderTarget3*, System.Drawing.Size*, int>)(lpVtbl[9]))((IDWriteBitmapRenderTarget3*)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]<IDWriteBitmapRenderTarget3*, uint, uint, int>)(lpVtbl[10]))((IDWriteBitmapRenderTarget3*)Unsafe.AsPointer(ref this), width, height);
	}

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

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

	/// <inheritdoc cref="IDWriteBitmapRenderTarget2.GetBitmapData" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(13)]
	public HResult GetBitmapData(BitmapDataBgra32* bitmapData)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget3*, BitmapDataBgra32*, int>)(lpVtbl[13]))((IDWriteBitmapRenderTarget3*)Unsafe.AsPointer(ref this), bitmapData);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget3::GetPaintFeatureLevel"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(14)]
	public PaintFeatureLevel GetPaintFeatureLevel()
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget3*, PaintFeatureLevel>)(lpVtbl[14]))((IDWriteBitmapRenderTarget3*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget3::DrawPaintGlyphRun"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(15)]
	public HResult DrawPaintGlyphRun(float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode, GlyphRun* glyphRun, GlyphImageFormats glyphImageFormat, uint textColor, uint colorPaletteIndex, Rect* blackBoxRect)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget3*, float, float, MeasuringMode, GlyphRun*, GlyphImageFormats, uint, uint, Rect*, int>)(lpVtbl[15]))((IDWriteBitmapRenderTarget3*)Unsafe.AsPointer(ref this), baselineOriginX, baselineOriginY, measuringMode, glyphRun, glyphImageFormat, textColor, colorPaletteIndex, blackBoxRect);
	}

	/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget3::DrawGlyphRunWithColorSupport"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(16)]
	public HResult DrawGlyphRunWithColorSupport(float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode, GlyphRun* glyphRun, IDWriteRenderingParams* renderingParams, uint textColor, uint colorPaletteIndex, Rect* blackBoxRect)
	{
		return ((delegate* unmanaged[MemberFunction]<IDWriteBitmapRenderTarget3*, float, float, MeasuringMode, GlyphRun*, IDWriteRenderingParams*, uint, uint, Rect*, int>)(lpVtbl[16]))((IDWriteBitmapRenderTarget3*)Unsafe.AsPointer(ref this), baselineOriginX, baselineOriginY, measuringMode, glyphRun, renderingParams, textColor, colorPaletteIndex, blackBoxRect);
	}

	public interface Interface : IDWriteBitmapRenderTarget2.Interface
	{
		[VtblIndex(14)]
		PaintFeatureLevel GetPaintFeatureLevel();

		[VtblIndex(15)]
		HResult DrawPaintGlyphRun(float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode, GlyphRun* glyphRun, GlyphImageFormats glyphImageFormat, uint textColor, uint colorPaletteIndex, Rect* blackBoxRect);

		[VtblIndex(16)]
		HResult DrawGlyphRunWithColorSupport(float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode, GlyphRun* glyphRun, IDWriteRenderingParams* renderingParams, uint textColor, uint colorPaletteIndex, Rect* blackBoxRect);
	}
}

