// ------------------------------------------------------------------------------
//
// 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;
///
/// ID2D1CommandSink2
[Guid("3bab440e-417e-47df-a2e2-bc0be6a00916")]
[NativeTypeName("struct ID2D1CommandSink2 : ID2D1CommandSink1")]
[NativeInheritance("ID2D1CommandSink1")]
public unsafe partial struct ID2D1CommandSink2 : ID2D1CommandSink2.Interface, INativeGuid
{
public static ref readonly Guid IID_ID2D1CommandSink2
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan data = new byte[] {
0x0E, 0x44, 0xAB, 0x3B,
0x7E, 0x41,
0xDF, 0x47,
0xA2,
0xE2,
0xBC,
0x0B,
0xE6,
0xA0,
0x09,
0x16
};
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_ID2D1CommandSink2));
#else
public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_ID2D1CommandSink2));
#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]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(1)]
[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(2)]
[return: NativeTypeName("ULONG")]
public uint Release()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)]
public HResult BeginDraw()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)]
public HResult EndDraw()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(5)]
public HResult SetAntialiasMode(AntialiasMode antialiasMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), antialiasMode);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(6)]
public HResult SetTags(ulong tag1, ulong tag2)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), tag1, tag2);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(7)]
public HResult SetTextAntialiasMode(TextAntialiasMode textAntialiasMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), textAntialiasMode);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
public HResult SetTextRenderingParams(Graphics.DirectWrite.IDWriteRenderingParams* textRenderingParams)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), textRenderingParams);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(9)]
public HResult SetTransform(Matrix3x2* transform)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), transform);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(10)]
public HResult SetPrimitiveBlend(PrimitiveBlend primitiveBlend)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), primitiveBlend);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(11)]
public HResult SetUnitMode(UnitMode unitMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), unitMode);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(12)]
public HResult Clear(Color4* color)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), color);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
public HResult DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
public HResult DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(15)]
public HResult DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), geometry, brush, strokeWidth, strokeStyle);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(16)]
public HResult DrawRectangle(Common.RectF* rect, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), rect, brush, strokeWidth, strokeStyle);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(17)]
public HResult DrawBitmap(ID2D1Bitmap* bitmap, Common.RectF* destinationRectangle, float opacity, InterpolationMode interpolationMode, Common.RectF* sourceRectangle, Matrix4x4* perspectiveTransform)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle, perspectiveTransform);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(18)]
public HResult DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(19)]
public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(20)]
public HResult FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), mesh, brush);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(21)]
public HResult FillOpacityMask(ID2D1Bitmap* opacityMask, ID2D1Brush* brush, Common.RectF* destinationRectangle, Common.RectF* sourceRectangle)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), opacityMask, brush, destinationRectangle, sourceRectangle);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(22)]
public HResult FillGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, ID2D1Brush* opacityBrush)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), geometry, brush, opacityBrush);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(23)]
public HResult FillRectangle(Common.RectF* rect, ID2D1Brush* brush)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), rect, brush);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(24)]
public HResult PushAxisAlignedClip(Common.RectF* clipRect, AntialiasMode antialiasMode)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), clipRect, antialiasMode);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(25)]
public HResult PushLayer(LayerParameters1* layerParameters1, ID2D1Layer* layer)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), layerParameters1, layer);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(26)]
public HResult PopAxisAlignedClip()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(27)]
public HResult PopLayer()
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this));
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(28)]
public HResult SetPrimitiveBlend1(PrimitiveBlend primitiveBlend)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), primitiveBlend);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(29)]
public HResult DrawInk(ID2D1Ink* ink, ID2D1Brush* brush, ID2D1InkStyle* inkStyle)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), ink, brush, inkStyle);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(30)]
public HResult DrawGradientMesh(ID2D1GradientMesh* gradientMesh)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[30]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), gradientMesh);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(31)]
public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Common.RectF* destinationRectangle, Common.RectF* sourceRectangle)
{
return ((delegate* unmanaged[Stdcall])(lpVtbl[31]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), gdiMetafile, destinationRectangle, sourceRectangle);
}
public interface Interface : ID2D1CommandSink1.Interface
{
[VtblIndex(29)]
HResult DrawInk(ID2D1Ink* ink, ID2D1Brush* brush, ID2D1InkStyle* inkStyle);
[VtblIndex(30)]
HResult DrawGradientMesh(ID2D1GradientMesh* gradientMesh);
[VtblIndex(31)]
HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Common.RectF* destinationRectangle, Common.RectF* sourceRectangle);
}
}