Various improvements and handle extensions in better way.

This commit is contained in:
Amer Koleci
2022-09-19 17:35:45 +02:00
parent 0c2dfea0e4
commit f16e29ed75
16 changed files with 404 additions and 288 deletions

View File

@@ -1,11 +1,7 @@
// Copyright © Amer Koleci and Contributors. // Copyright © Amer Koleci and Contributors.
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. // Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
using System.ComponentModel.DataAnnotations;
using System.Data.Common;
using System.Globalization; using System.Globalization;
using System.Reflection;
using System.Reflection.Metadata;
using System.Text; using System.Text;
using Newtonsoft.Json; using Newtonsoft.Json;
@@ -15,8 +11,6 @@ public static class Program
{ {
private static readonly string[] jsons = new[] private static readonly string[] jsons = new[]
{ {
//"System.Com.json",
"Graphics.json", "Graphics.json",
"Graphics.Dxgi.Common.json", "Graphics.Dxgi.Common.json",
"Graphics.Dxgi.json", "Graphics.Dxgi.json",
@@ -101,9 +95,12 @@ public static class Program
{ "Graphics.Direct2D.Common.D2D_VECTOR_3F", "Vector3" }, { "Graphics.Direct2D.Common.D2D_VECTOR_3F", "Vector3" },
{ "Graphics.Direct2D.Common.D2D_VECTOR_4F", "Vector4" }, { "Graphics.Direct2D.Common.D2D_VECTOR_4F", "Vector4" },
{ "Graphics.Direct2D.Common.D2D_SIZE_F", "System.Drawing.SizeF" }, { "Graphics.Direct2D.Common.D2D_SIZE_F", "System.Drawing.SizeF" },
{ "Graphics.Direct2D.Common.D2D_POINT_2U", "System.Drawing.Point" },
{ "Graphics.Direct2D.Common.D2D_SIZE_U", "System.Drawing.Size" },
{ "Graphics.Imaging.WICRect", "System.Drawing.Rectangle" }, { "Graphics.Imaging.WICRect", "System.Drawing.Rectangle" },
{ "Graphics.DirectWrite.DWRITE_COLOR_F", "Win32.Graphics.Direct2D.Common.ColorF" },
{ "Graphics.Direct2D.Matrix4x3F", "Win32.Graphics.Direct2D.Common.Matrix4x3" }, { "Graphics.Direct2D.Matrix4x3F", "Win32.Graphics.Direct2D.Common.Matrix4x3" },
{ "Graphics.Direct2D.Matrix4x4F", "Matrix4x4" }, { "Graphics.Direct2D.Matrix4x4F", "Matrix4x4" },
{ "Graphics.Direct2D.Matrix5x4F", "Win32.Graphics.Direct2D.Common.Matrix5x4" }, { "Graphics.Direct2D.Matrix5x4F", "Win32.Graphics.Direct2D.Common.Matrix5x4" },
@@ -1888,13 +1885,20 @@ public static class Program
StringBuilder argumentsNameBuilder = new(); StringBuilder argumentsNameBuilder = new();
int parameterIndex = 0; int parameterIndex = 0;
bool allOptional = false;
if (method.Name == "EndDraw")
{
allOptional =
method.Params.All(item => item.Attrs.Any(attr => attr is string str && str == "Optional"));
}
foreach (ApiParameter parameter in method.Params) foreach (ApiParameter parameter in method.Params)
{ {
bool asPointer = false; bool asPointer = false;
string parameterType = string.Empty; string parameterType = string.Empty;
if (method.Name == "CreateBitmap" && comType.Name == "ID2D1RenderTarget")
if (method.Name == "CreateSurface" && parameter.Name == "ppSurface")
{ {
} }
@@ -1975,10 +1979,10 @@ public static class Program
parameterName = CleanupName(parameterName); parameterName = CleanupName(parameterName);
argumentBuilder.Append(parameterType).Append(' ').Append(parameterName); argumentBuilder.Append(parameterType).Append(' ').Append(parameterName);
//if (isOptional == true) if (allOptional == true && isOptional == true)
//{ {
//argumentBuilder.Append(" = default"); argumentBuilder.Append(" = null");
//} }
argumentsTypesBuilder.Append(parameterType); argumentsTypesBuilder.Append(parameterType);
argumentsNameBuilder.Append(parameterName); argumentsNameBuilder.Append(parameterName);
@@ -2370,6 +2374,10 @@ public static class Program
{ {
return "Level_" + prettyName; return "Level_" + prettyName;
} }
else if (enumPrefix.Contains("_GAMMA"))
{
return "Gamma_" + prettyName[0] + "_" + prettyName[1];
}
return "_" + prettyName; return "_" + prettyName;
} }
@@ -2514,6 +2522,10 @@ public static class Program
case "Luid": case "Luid":
case "HResult": case "HResult":
return true; return true;
case "System.Drawing.Size":
case "System.Drawing.SizeF":
return true;
} }
return false; return false;

View File

@@ -43,7 +43,7 @@ public readonly partial struct Bool32 : IComparable, IComparable<Bool32>, IEquat
public static explicit operator short(Bool32 value) => (short)(value.Value); public static explicit operator short(Bool32 value) => (short)(value.Value);
public static implicit operator Bool32(int value) => new Bool32(value); public static implicit operator Bool32(int value) => new(value);
public static implicit operator int(Bool32 value) => value.Value; public static implicit operator int(Bool32 value) => value.Value;

View File

@@ -290,17 +290,6 @@ public partial struct PixelFormat
public AlphaMode alphaMode; public AlphaMode alphaMode;
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D_POINT_2U"]/*' />
/// <unmanaged>D2D_POINT_2U</unmanaged>
public partial struct Point2u
{
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D_POINT_2U::x"]/*' />
public uint x;
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D_POINT_2U::y"]/*' />
public uint y;
}
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D_RECT_F"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D_RECT_F"]/*' />
/// <unmanaged>D2D_RECT_F</unmanaged> /// <unmanaged>D2D_RECT_F</unmanaged>
public partial struct RectF public partial struct RectF
@@ -335,17 +324,6 @@ public partial struct RectU
public uint bottom; public uint bottom;
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D_SIZE_U"]/*' />
/// <unmanaged>D2D_SIZE_U</unmanaged>
public partial struct SizeU
{
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D_SIZE_U::width"]/*' />
public uint width;
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D_SIZE_U::height"]/*' />
public uint height;
}
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_BEZIER_SEGMENT"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_BEZIER_SEGMENT"]/*' />
/// <unmanaged>D2D1_BEZIER_SEGMENT</unmanaged> /// <unmanaged>D2D1_BEZIER_SEGMENT</unmanaged>
public partial struct BezierSegment public partial struct BezierSegment

View File

@@ -1624,10 +1624,10 @@ public enum Gamma : uint
{ {
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_GAMMA::D2D1_GAMMA_2_2"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_GAMMA::D2D1_GAMMA_2_2"]/*' />
/// <unmanaged>D2D1_GAMMA_2_2</unmanaged> /// <unmanaged>D2D1_GAMMA_2_2</unmanaged>
_22 = 0, Gamma_2_2 = 0,
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_GAMMA::D2D1_GAMMA_1_0"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_GAMMA::D2D1_GAMMA_1_0"]/*' />
/// <unmanaged>D2D1_GAMMA_1_0</unmanaged> /// <unmanaged>D2D1_GAMMA_1_0</unmanaged>
_10 = 1, Gamma_1_0 = 1,
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_OPACITY_MASK_CONTENT"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_OPACITY_MASK_CONTENT"]/*' />
@@ -4875,7 +4875,7 @@ public partial struct HwndRenderTargetProperties
public IntPtr hwnd; public IntPtr hwnd;
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_HWND_RENDER_TARGET_PROPERTIES::pixelSize"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_HWND_RENDER_TARGET_PROPERTIES::pixelSize"]/*' />
public Common.SizeU pixelSize; public System.Drawing.Size pixelSize;
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_HWND_RENDER_TARGET_PROPERTIES::presentOptions"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_HWND_RENDER_TARGET_PROPERTIES::presentOptions"]/*' />
public PresentOptions presentOptions; public PresentOptions presentOptions;
@@ -4948,7 +4948,7 @@ public partial struct RenderingControls
public BufferPrecision bufferPrecision; public BufferPrecision bufferPrecision;
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_RENDERING_CONTROLS::tileSize"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_RENDERING_CONTROLS::tileSize"]/*' />
public Common.SizeU tileSize; public System.Drawing.Size tileSize;
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_EFFECT_INPUT_DESCRIPTION"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="D2D1_EFFECT_INPUT_DESCRIPTION"]/*' />
@@ -5704,9 +5704,9 @@ public unsafe partial struct ID2D1Bitmap
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::GetPixelSize"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::GetPixelSize"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(5)] [VtblIndex(5)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[5]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap*, System.Drawing.Size>)(lpVtbl[5]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this));
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::GetPixelFormat"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::GetPixelFormat"]/*' />
@@ -5728,17 +5728,17 @@ public unsafe partial struct ID2D1Bitmap
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::CopyFromBitmap"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::CopyFromBitmap"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)] [VtblIndex(8)]
public HResult CopyFromBitmap(Common.Point2u* destPoint, ID2D1Bitmap* bitmap, Common.RectU* srcRect) public HResult CopyFromBitmap(System.Drawing.Point* destPoint, ID2D1Bitmap* bitmap, Common.RectU* srcRect)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap*, Common.Point2u*, ID2D1Bitmap*, Common.RectU*, int>)(lpVtbl[8]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect); return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap*, System.Drawing.Point*, ID2D1Bitmap*, Common.RectU*, int>)(lpVtbl[8]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::CopyFromRenderTarget"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::CopyFromRenderTarget"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(9)] [VtblIndex(9)]
public HResult CopyFromRenderTarget(Common.Point2u* destPoint, ID2D1RenderTarget* renderTarget, Common.RectU* srcRect) public HResult CopyFromRenderTarget(System.Drawing.Point* destPoint, ID2D1RenderTarget* renderTarget, Common.RectU* srcRect)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap*, Common.Point2u*, ID2D1RenderTarget*, Common.RectU*, int>)(lpVtbl[9]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect); return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap*, System.Drawing.Point*, ID2D1RenderTarget*, Common.RectU*, int>)(lpVtbl[9]))((ID2D1Bitmap*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::CopyFromMemory"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1Bitmap::CopyFromMemory"]/*' />
@@ -8550,9 +8550,9 @@ public unsafe partial struct ID2D1RenderTarget
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::CreateBitmap"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::CreateBitmap"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)] [VtblIndex(4)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1RenderTarget*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[4]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1RenderTarget*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[4]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::CreateBitmapFromWicBitmap"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::CreateBitmapFromWicBitmap"]/*' />
@@ -8614,9 +8614,9 @@ public unsafe partial struct ID2D1RenderTarget
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::CreateCompatibleRenderTarget"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::CreateCompatibleRenderTarget"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(12)] [VtblIndex(12)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1RenderTarget*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[12]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1RenderTarget*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[12]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::CreateLayer"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::CreateLayer"]/*' />
@@ -8910,7 +8910,7 @@ public unsafe partial struct ID2D1RenderTarget
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::EndDraw"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::EndDraw"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(49)] [VtblIndex(49)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1RenderTarget*, ulong*, ulong*, int>)(lpVtbl[49]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1RenderTarget*, ulong*, ulong*, int>)(lpVtbl[49]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -8950,9 +8950,9 @@ public unsafe partial struct ID2D1RenderTarget
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::GetPixelSize"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::GetPixelSize"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(54)] [VtblIndex(54)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1RenderTarget*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[54]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1RenderTarget*, System.Drawing.Size>)(lpVtbl[54]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this));
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::GetMaximumBitmapSize"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1RenderTarget::GetMaximumBitmapSize"]/*' />
@@ -9036,9 +9036,9 @@ public unsafe partial struct ID2D1BitmapRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)] [VtblIndex(3)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1BitmapRenderTarget*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[3]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1BitmapRenderTarget*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[3]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -9100,9 +9100,9 @@ public unsafe partial struct ID2D1BitmapRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(11)] [VtblIndex(11)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1BitmapRenderTarget*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[11]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1BitmapRenderTarget*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[11]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -9396,7 +9396,7 @@ public unsafe partial struct ID2D1BitmapRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(48)] [VtblIndex(48)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1BitmapRenderTarget*, ulong*, ulong*, int>)(lpVtbl[48]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1BitmapRenderTarget*, ulong*, ulong*, int>)(lpVtbl[48]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -9436,9 +9436,9 @@ public unsafe partial struct ID2D1BitmapRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(53)] [VtblIndex(53)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1BitmapRenderTarget*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[53]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1BitmapRenderTarget*, System.Drawing.Size>)(lpVtbl[53]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -9538,9 +9538,9 @@ public unsafe partial struct ID2D1HwndRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)] [VtblIndex(3)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[3]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[3]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -9602,9 +9602,9 @@ public unsafe partial struct ID2D1HwndRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(11)] [VtblIndex(11)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[11]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[11]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -9898,7 +9898,7 @@ public unsafe partial struct ID2D1HwndRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(48)] [VtblIndex(48)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, ulong*, ulong*, int>)(lpVtbl[48]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, ulong*, ulong*, int>)(lpVtbl[48]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -9938,9 +9938,9 @@ public unsafe partial struct ID2D1HwndRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(53)] [VtblIndex(53)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[53]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, System.Drawing.Size>)(lpVtbl[53]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -9978,9 +9978,9 @@ public unsafe partial struct ID2D1HwndRenderTarget
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1HwndRenderTarget::Resize"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1HwndRenderTarget::Resize"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(58)] [VtblIndex(58)]
public HResult Resize(Common.SizeU* pixelSize) public HResult Resize(System.Drawing.Size* pixelSize)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, Common.SizeU*, int>)(lpVtbl[58]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), pixelSize); return ((delegate* unmanaged[Stdcall]<ID2D1HwndRenderTarget*, System.Drawing.Size*, int>)(lpVtbl[58]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), pixelSize);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1HwndRenderTarget::GetHwnd"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1HwndRenderTarget::GetHwnd"]/*' />
@@ -10134,9 +10134,9 @@ public unsafe partial struct ID2D1DCRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)] [VtblIndex(3)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DCRenderTarget*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[3]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DCRenderTarget*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[3]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -10198,9 +10198,9 @@ public unsafe partial struct ID2D1DCRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(11)] [VtblIndex(11)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DCRenderTarget*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[11]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1DCRenderTarget*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[11]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -10494,7 +10494,7 @@ public unsafe partial struct ID2D1DCRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(48)] [VtblIndex(48)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DCRenderTarget*, ulong*, ulong*, int>)(lpVtbl[48]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1DCRenderTarget*, ulong*, ulong*, int>)(lpVtbl[48]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -10534,9 +10534,9 @@ public unsafe partial struct ID2D1DCRenderTarget
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(53)] [VtblIndex(53)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DCRenderTarget*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[53]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1DCRenderTarget*, System.Drawing.Size>)(lpVtbl[53]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -11314,9 +11314,9 @@ public unsafe partial struct ID2D1PrintControl
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1PrintControl::AddPage"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1PrintControl::AddPage"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)] [VtblIndex(3)]
public HResult AddPage(ID2D1CommandList* commandList, System.Drawing.SizeF* pageSize, Com.IStream* pagePrintTicketStream, ulong* tag1, ulong* tag2) public HResult AddPage(ID2D1CommandList* commandList, System.Drawing.SizeF pageSize, Com.IStream* pagePrintTicketStream, ulong* tag1, ulong* tag2)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1PrintControl*, ID2D1CommandList*, System.Drawing.SizeF*, Com.IStream*, ulong*, ulong*, int>)(lpVtbl[3]))((ID2D1PrintControl*)Unsafe.AsPointer(ref this), commandList, pageSize, pagePrintTicketStream, tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1PrintControl*, ID2D1CommandList*, System.Drawing.SizeF, Com.IStream*, ulong*, ulong*, int>)(lpVtbl[3]))((ID2D1PrintControl*)Unsafe.AsPointer(ref this), commandList, pageSize, pagePrintTicketStream, tag1, tag2);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1PrintControl::Close"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1PrintControl::Close"]/*' />
@@ -12468,9 +12468,9 @@ public unsafe partial struct ID2D1Bitmap1
/// <inheritdoc cref="ID2D1Bitmap.GetPixelSize" /> /// <inheritdoc cref="ID2D1Bitmap.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)] [VtblIndex(4)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[4]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, System.Drawing.Size>)(lpVtbl[4]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1Bitmap.GetPixelFormat" /> /// <inheritdoc cref="ID2D1Bitmap.GetPixelFormat" />
@@ -12492,17 +12492,17 @@ public unsafe partial struct ID2D1Bitmap1
/// <inheritdoc cref="ID2D1Bitmap.CopyFromBitmap" /> /// <inheritdoc cref="ID2D1Bitmap.CopyFromBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(7)] [VtblIndex(7)]
public HResult CopyFromBitmap(Common.Point2u* destPoint, ID2D1Bitmap* bitmap, Common.RectU* srcRect) public HResult CopyFromBitmap(System.Drawing.Point* destPoint, ID2D1Bitmap* bitmap, Common.RectU* srcRect)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, Common.Point2u*, ID2D1Bitmap*, Common.RectU*, int>)(lpVtbl[7]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect); return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, System.Drawing.Point*, ID2D1Bitmap*, Common.RectU*, int>)(lpVtbl[7]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, bitmap, srcRect);
} }
/// <inheritdoc cref="ID2D1Bitmap.CopyFromRenderTarget" /> /// <inheritdoc cref="ID2D1Bitmap.CopyFromRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)] [VtblIndex(8)]
public HResult CopyFromRenderTarget(Common.Point2u* destPoint, ID2D1RenderTarget* renderTarget, Common.RectU* srcRect) public HResult CopyFromRenderTarget(System.Drawing.Point* destPoint, ID2D1RenderTarget* renderTarget, Common.RectU* srcRect)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, Common.Point2u*, ID2D1RenderTarget*, Common.RectU*, int>)(lpVtbl[8]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect); return ((delegate* unmanaged[Stdcall]<ID2D1Bitmap1*, System.Drawing.Point*, ID2D1RenderTarget*, Common.RectU*, int>)(lpVtbl[8]))((ID2D1Bitmap1*)Unsafe.AsPointer(ref this), destPoint, renderTarget, srcRect);
} }
/// <inheritdoc cref="ID2D1Bitmap.CopyFromMemory" /> /// <inheritdoc cref="ID2D1Bitmap.CopyFromMemory" />
@@ -12980,9 +12980,9 @@ public unsafe partial struct ID2D1DeviceContext
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)] [VtblIndex(3)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[3]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[3]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -13044,9 +13044,9 @@ public unsafe partial struct ID2D1DeviceContext
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(11)] [VtblIndex(11)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[11]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[11]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -13340,7 +13340,7 @@ public unsafe partial struct ID2D1DeviceContext
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(48)] [VtblIndex(48)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, ulong*, ulong*, int>)(lpVtbl[48]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, ulong*, ulong*, int>)(lpVtbl[48]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -13380,9 +13380,9 @@ public unsafe partial struct ID2D1DeviceContext
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(53)] [VtblIndex(53)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[53]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, System.Drawing.Size>)(lpVtbl[53]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -13412,9 +13412,9 @@ public unsafe partial struct ID2D1DeviceContext
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1DeviceContext::CreateBitmap"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1DeviceContext::CreateBitmap"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(57)] [VtblIndex(57)]
public HResult CreateBitmap(Common.SizeU* size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, Common.SizeU*, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[57]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext*, System.Drawing.Size, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[57]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1DeviceContext::CreateBitmapFromWicBitmap"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1DeviceContext::CreateBitmapFromWicBitmap"]/*' />
@@ -15310,9 +15310,9 @@ public unsafe partial struct ID2D1SourceTransform
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1SourceTransform::Draw"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1SourceTransform::Draw"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)] [VtblIndex(8)]
public HResult Draw(ID2D1Bitmap1* target, RawRect* drawRect, Common.Point2u* targetOrigin) public HResult Draw(ID2D1Bitmap1* target, RawRect* drawRect, System.Drawing.Point* targetOrigin)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1SourceTransform*, ID2D1Bitmap1*, RawRect*, Common.Point2u*, int>)(lpVtbl[8]))((ID2D1SourceTransform*)Unsafe.AsPointer(ref this), target, drawRect, targetOrigin); return ((delegate* unmanaged[Stdcall]<ID2D1SourceTransform*, ID2D1Bitmap1*, RawRect*, System.Drawing.Point*, int>)(lpVtbl[8]))((ID2D1SourceTransform*)Unsafe.AsPointer(ref this), target, drawRect, targetOrigin);
} }
} }
@@ -16244,9 +16244,9 @@ public unsafe partial struct ID2D1DeviceContext1
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)] [VtblIndex(3)]
public HResult CreateBitmap(Common.SizeU* size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, Common.SizeU*, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[3]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, System.Drawing.Size, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[3]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" />
@@ -16524,9 +16524,9 @@ public unsafe partial struct ID2D1DeviceContext1
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(38)] [VtblIndex(38)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[38]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[38]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -16588,9 +16588,9 @@ public unsafe partial struct ID2D1DeviceContext1
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(46)] [VtblIndex(46)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[46]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[46]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -16884,7 +16884,7 @@ public unsafe partial struct ID2D1DeviceContext1
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(83)] [VtblIndex(83)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, ulong*, ulong*, int>)(lpVtbl[83]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, ulong*, ulong*, int>)(lpVtbl[83]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -16924,9 +16924,9 @@ public unsafe partial struct ID2D1DeviceContext1
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(88)] [VtblIndex(88)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[88]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext1*, System.Drawing.Size>)(lpVtbl[88]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -18656,9 +18656,9 @@ public unsafe partial struct ID2D1SvgDocument
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1SvgDocument::SetViewportSize"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1SvgDocument::SetViewportSize"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(4)] [VtblIndex(4)]
public HResult SetViewportSize(System.Drawing.SizeF* viewportSize) public HResult SetViewportSize(System.Drawing.SizeF viewportSize)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1SvgDocument*, System.Drawing.SizeF*, int>)(lpVtbl[4]))((ID2D1SvgDocument*)Unsafe.AsPointer(ref this), viewportSize); return ((delegate* unmanaged[Stdcall]<ID2D1SvgDocument*, System.Drawing.SizeF, int>)(lpVtbl[4]))((ID2D1SvgDocument*)Unsafe.AsPointer(ref this), viewportSize);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1SvgDocument::GetViewportSize"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1SvgDocument::GetViewportSize"]/*' />
@@ -19520,9 +19520,9 @@ public unsafe partial struct ID2D1DeviceContext2
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(6)] [VtblIndex(6)]
public HResult CreateBitmap(Common.SizeU* size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, Common.SizeU*, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[6]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, System.Drawing.Size, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[6]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" />
@@ -19800,9 +19800,9 @@ public unsafe partial struct ID2D1DeviceContext2
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(41)] [VtblIndex(41)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[41]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[41]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -19864,9 +19864,9 @@ public unsafe partial struct ID2D1DeviceContext2
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(49)] [VtblIndex(49)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[49]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[49]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -20160,7 +20160,7 @@ public unsafe partial struct ID2D1DeviceContext2
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(86)] [VtblIndex(86)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, ulong*, ulong*, int>)(lpVtbl[86]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, ulong*, ulong*, int>)(lpVtbl[86]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -20200,9 +20200,9 @@ public unsafe partial struct ID2D1DeviceContext2
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(91)] [VtblIndex(91)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[91]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext2*, System.Drawing.Size>)(lpVtbl[91]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -21498,9 +21498,9 @@ public unsafe partial struct ID2D1DeviceContext3
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(17)] [VtblIndex(17)]
public HResult CreateBitmap(Common.SizeU* size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, Common.SizeU*, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[17]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, System.Drawing.Size, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[17]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" />
@@ -21778,9 +21778,9 @@ public unsafe partial struct ID2D1DeviceContext3
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(52)] [VtblIndex(52)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[52]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[52]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -21842,9 +21842,9 @@ public unsafe partial struct ID2D1DeviceContext3
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(60)] [VtblIndex(60)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[60]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[60]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -22138,7 +22138,7 @@ public unsafe partial struct ID2D1DeviceContext3
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(97)] [VtblIndex(97)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, ulong*, ulong*, int>)(lpVtbl[97]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, ulong*, ulong*, int>)(lpVtbl[97]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -22178,9 +22178,9 @@ public unsafe partial struct ID2D1DeviceContext3
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(102)] [VtblIndex(102)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[102]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext3*, System.Drawing.Size>)(lpVtbl[102]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -23264,9 +23264,9 @@ public unsafe partial struct ID2D1DeviceContext4
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(19)] [VtblIndex(19)]
public HResult CreateBitmap(Common.SizeU* size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, Common.SizeU*, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[19]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, System.Drawing.Size, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[19]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" />
@@ -23544,9 +23544,9 @@ public unsafe partial struct ID2D1DeviceContext4
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(54)] [VtblIndex(54)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[54]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[54]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -23608,9 +23608,9 @@ public unsafe partial struct ID2D1DeviceContext4
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(62)] [VtblIndex(62)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[62]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[62]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -23904,7 +23904,7 @@ public unsafe partial struct ID2D1DeviceContext4
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(99)] [VtblIndex(99)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, ulong*, ulong*, int>)(lpVtbl[99]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, ulong*, ulong*, int>)(lpVtbl[99]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -23944,9 +23944,9 @@ public unsafe partial struct ID2D1DeviceContext4
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(104)] [VtblIndex(104)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[104]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext4*, System.Drawing.Size>)(lpVtbl[104]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -25174,9 +25174,9 @@ public unsafe partial struct ID2D1DeviceContext5
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(26)] [VtblIndex(26)]
public HResult CreateBitmap(Common.SizeU* size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, Common.SizeU*, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[26]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, System.Drawing.Size, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[26]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" />
@@ -25454,9 +25454,9 @@ public unsafe partial struct ID2D1DeviceContext5
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(61)] [VtblIndex(61)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[61]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[61]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -25518,9 +25518,9 @@ public unsafe partial struct ID2D1DeviceContext5
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(69)] [VtblIndex(69)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[69]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[69]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -25814,7 +25814,7 @@ public unsafe partial struct ID2D1DeviceContext5
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(106)] [VtblIndex(106)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, ulong*, ulong*, int>)(lpVtbl[106]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, ulong*, ulong*, int>)(lpVtbl[106]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -25854,9 +25854,9 @@ public unsafe partial struct ID2D1DeviceContext5
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(111)] [VtblIndex(111)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[111]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, System.Drawing.Size>)(lpVtbl[111]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />
@@ -25886,9 +25886,9 @@ public unsafe partial struct ID2D1DeviceContext5
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1DeviceContext5::CreateSvgDocument"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1DeviceContext5::CreateSvgDocument"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(115)] [VtblIndex(115)]
public HResult CreateSvgDocument(Com.IStream* inputXmlStream, System.Drawing.SizeF* viewportSize, ID2D1SvgDocument** svgDocument) public HResult CreateSvgDocument(Com.IStream* inputXmlStream, System.Drawing.SizeF viewportSize, ID2D1SvgDocument** svgDocument)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, Com.IStream*, System.Drawing.SizeF*, ID2D1SvgDocument**, int>)(lpVtbl[115]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), inputXmlStream, viewportSize, svgDocument); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext5*, Com.IStream*, System.Drawing.SizeF, ID2D1SvgDocument**, int>)(lpVtbl[115]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), inputXmlStream, viewportSize, svgDocument);
} }
/// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1DeviceContext5::DrawSvgDocument"]/*' /> /// <include file='../Direct2D.xml' path='doc/member[@name="ID2D1DeviceContext5::DrawSvgDocument"]/*' />
@@ -26782,9 +26782,9 @@ public unsafe partial struct ID2D1DeviceContext6
/// <inheritdoc cref="ID2D1DeviceContext5.CreateSvgDocument" /> /// <inheritdoc cref="ID2D1DeviceContext5.CreateSvgDocument" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(3)] [VtblIndex(3)]
public HResult CreateSvgDocument(Com.IStream* inputXmlStream, System.Drawing.SizeF* viewportSize, ID2D1SvgDocument** svgDocument) public HResult CreateSvgDocument(Com.IStream* inputXmlStream, System.Drawing.SizeF viewportSize, ID2D1SvgDocument** svgDocument)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, Com.IStream*, System.Drawing.SizeF*, ID2D1SvgDocument**, int>)(lpVtbl[3]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), inputXmlStream, viewportSize, svgDocument); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, Com.IStream*, System.Drawing.SizeF, ID2D1SvgDocument**, int>)(lpVtbl[3]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), inputXmlStream, viewportSize, svgDocument);
} }
/// <inheritdoc cref="ID2D1DeviceContext5.DrawSvgDocument" /> /// <inheritdoc cref="ID2D1DeviceContext5.DrawSvgDocument" />
@@ -26998,9 +26998,9 @@ public unsafe partial struct ID2D1DeviceContext6
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(30)] [VtblIndex(30)]
public HResult CreateBitmap(Common.SizeU* size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* sourceData, uint pitch, BitmapProperties1* bitmapProperties, ID2D1Bitmap1** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, Common.SizeU*, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[30]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, System.Drawing.Size, void*, uint, BitmapProperties1*, ID2D1Bitmap1**, int>)(lpVtbl[30]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), size, sourceData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1DeviceContext.CreateBitmapFromWicBitmap" />
@@ -27278,9 +27278,9 @@ public unsafe partial struct ID2D1DeviceContext6
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmap" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(65)] [VtblIndex(65)]
public HResult CreateBitmap(Common.SizeU* size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap) public HResult CreateBitmap(System.Drawing.Size size, void* srcData, uint pitch, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, Common.SizeU*, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[65]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, System.Drawing.Size, void*, uint, BitmapProperties*, ID2D1Bitmap**, int>)(lpVtbl[65]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), size, srcData, pitch, bitmapProperties, bitmap);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateBitmapFromWicBitmap" />
@@ -27342,9 +27342,9 @@ public unsafe partial struct ID2D1DeviceContext6
/// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateCompatibleRenderTarget" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(73)] [VtblIndex(73)]
public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, Common.SizeU* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget) public HResult CreateCompatibleRenderTarget(System.Drawing.SizeF* desiredSize, System.Drawing.Size* desiredPixelSize, Common.PixelFormat* desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, System.Drawing.SizeF*, Common.SizeU*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[73]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, System.Drawing.SizeF*, System.Drawing.Size*, Common.PixelFormat*, CompatibleRenderTargetOptions, ID2D1BitmapRenderTarget**, int>)(lpVtbl[73]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), desiredSize, desiredPixelSize, desiredFormat, options, bitmapRenderTarget);
} }
/// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" /> /// <inheritdoc cref="ID2D1RenderTarget.CreateLayer" />
@@ -27638,7 +27638,7 @@ public unsafe partial struct ID2D1DeviceContext6
/// <inheritdoc cref="ID2D1RenderTarget.EndDraw" /> /// <inheritdoc cref="ID2D1RenderTarget.EndDraw" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(110)] [VtblIndex(110)]
public HResult EndDraw(ulong* tag1, ulong* tag2) public HResult EndDraw(ulong* tag1 = null, ulong* tag2 = null)
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, ulong*, ulong*, int>)(lpVtbl[110]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), tag1, tag2); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, ulong*, ulong*, int>)(lpVtbl[110]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), tag1, tag2);
} }
@@ -27678,9 +27678,9 @@ public unsafe partial struct ID2D1DeviceContext6
/// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetPixelSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(115)] [VtblIndex(115)]
public Graphics.Direct2D.Common.SizeU GetPixelSize() public System.Drawing.Size GetPixelSize()
{ {
return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, Graphics.Direct2D.Common.SizeU>)(lpVtbl[115]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this)); return ((delegate* unmanaged[Stdcall]<ID2D1DeviceContext6*, System.Drawing.Size>)(lpVtbl[115]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this));
} }
/// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" /> /// <inheritdoc cref="ID2D1RenderTarget.GetMaximumBitmapSize" />

View File

@@ -18573,9 +18573,9 @@ public unsafe partial struct ID3D11VideoContext
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoContext::VideoProcessorSetOutputConstriction"]/*' /> /// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoContext::VideoProcessorSetOutputConstriction"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(17)] [VtblIndex(17)]
public void VideoProcessorSetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32 Enable, System.Drawing.Size* Size) public void VideoProcessorSetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32 Enable, System.Drawing.Size Size)
{ {
((delegate* unmanaged[Stdcall]<ID3D11VideoContext*, ID3D11VideoProcessor*, Bool32, System.Drawing.Size*, void>)(lpVtbl[17]))((ID3D11VideoContext*)Unsafe.AsPointer(ref this), pVideoProcessor, Enable, Size); ((delegate* unmanaged[Stdcall]<ID3D11VideoContext*, ID3D11VideoProcessor*, Bool32, System.Drawing.Size, void>)(lpVtbl[17]))((ID3D11VideoContext*)Unsafe.AsPointer(ref this), pVideoProcessor, Enable, Size);
} }
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoContext::VideoProcessorSetOutputStereoMode"]/*' /> /// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoContext::VideoProcessorSetOutputStereoMode"]/*' />
@@ -18629,9 +18629,9 @@ public unsafe partial struct ID3D11VideoContext
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoContext::VideoProcessorGetOutputConstriction"]/*' /> /// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoContext::VideoProcessorGetOutputConstriction"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(24)] [VtblIndex(24)]
public void VideoProcessorGetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32* pEnabled, System.Drawing.Size** pSize) public void VideoProcessorGetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32* pEnabled, System.Drawing.Size* pSize)
{ {
((delegate* unmanaged[Stdcall]<ID3D11VideoContext*, ID3D11VideoProcessor*, Bool32*, System.Drawing.Size**, void>)(lpVtbl[24]))((ID3D11VideoContext*)Unsafe.AsPointer(ref this), pVideoProcessor, pEnabled, pSize); ((delegate* unmanaged[Stdcall]<ID3D11VideoContext*, ID3D11VideoProcessor*, Bool32*, System.Drawing.Size*, void>)(lpVtbl[24]))((ID3D11VideoContext*)Unsafe.AsPointer(ref this), pVideoProcessor, pEnabled, pSize);
} }
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoContext::VideoProcessorGetOutputStereoMode"]/*' /> /// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoContext::VideoProcessorGetOutputStereoMode"]/*' />
@@ -21875,9 +21875,9 @@ public unsafe partial struct ID3D11VideoContext1
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputConstriction" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputConstriction" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)] [VtblIndex(13)]
public void VideoProcessorSetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32 Enable, System.Drawing.Size* Size) public void VideoProcessorSetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32 Enable, System.Drawing.Size Size)
{ {
((delegate* unmanaged[Stdcall]<ID3D11VideoContext1*, ID3D11VideoProcessor*, Bool32, System.Drawing.Size*, void>)(lpVtbl[13]))((ID3D11VideoContext1*)Unsafe.AsPointer(ref this), pVideoProcessor, Enable, Size); ((delegate* unmanaged[Stdcall]<ID3D11VideoContext1*, ID3D11VideoProcessor*, Bool32, System.Drawing.Size, void>)(lpVtbl[13]))((ID3D11VideoContext1*)Unsafe.AsPointer(ref this), pVideoProcessor, Enable, Size);
} }
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputStereoMode" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputStereoMode" />
@@ -21931,9 +21931,9 @@ public unsafe partial struct ID3D11VideoContext1
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputConstriction" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputConstriction" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(20)] [VtblIndex(20)]
public void VideoProcessorGetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32* pEnabled, System.Drawing.Size** pSize) public void VideoProcessorGetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32* pEnabled, System.Drawing.Size* pSize)
{ {
((delegate* unmanaged[Stdcall]<ID3D11VideoContext1*, ID3D11VideoProcessor*, Bool32*, System.Drawing.Size**, void>)(lpVtbl[20]))((ID3D11VideoContext1*)Unsafe.AsPointer(ref this), pVideoProcessor, pEnabled, pSize); ((delegate* unmanaged[Stdcall]<ID3D11VideoContext1*, ID3D11VideoProcessor*, Bool32*, System.Drawing.Size*, void>)(lpVtbl[20]))((ID3D11VideoContext1*)Unsafe.AsPointer(ref this), pVideoProcessor, pEnabled, pSize);
} }
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputStereoMode" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputStereoMode" />
@@ -30465,9 +30465,9 @@ public unsafe partial struct ID3D11VideoContext2
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputConstriction" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputConstriction" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(27)] [VtblIndex(27)]
public void VideoProcessorSetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32 Enable, System.Drawing.Size* Size) public void VideoProcessorSetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32 Enable, System.Drawing.Size Size)
{ {
((delegate* unmanaged[Stdcall]<ID3D11VideoContext2*, ID3D11VideoProcessor*, Bool32, System.Drawing.Size*, void>)(lpVtbl[27]))((ID3D11VideoContext2*)Unsafe.AsPointer(ref this), pVideoProcessor, Enable, Size); ((delegate* unmanaged[Stdcall]<ID3D11VideoContext2*, ID3D11VideoProcessor*, Bool32, System.Drawing.Size, void>)(lpVtbl[27]))((ID3D11VideoContext2*)Unsafe.AsPointer(ref this), pVideoProcessor, Enable, Size);
} }
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputStereoMode" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputStereoMode" />
@@ -30521,9 +30521,9 @@ public unsafe partial struct ID3D11VideoContext2
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputConstriction" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputConstriction" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(34)] [VtblIndex(34)]
public void VideoProcessorGetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32* pEnabled, System.Drawing.Size** pSize) public void VideoProcessorGetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32* pEnabled, System.Drawing.Size* pSize)
{ {
((delegate* unmanaged[Stdcall]<ID3D11VideoContext2*, ID3D11VideoProcessor*, Bool32*, System.Drawing.Size**, void>)(lpVtbl[34]))((ID3D11VideoContext2*)Unsafe.AsPointer(ref this), pVideoProcessor, pEnabled, pSize); ((delegate* unmanaged[Stdcall]<ID3D11VideoContext2*, ID3D11VideoProcessor*, Bool32*, System.Drawing.Size*, void>)(lpVtbl[34]))((ID3D11VideoContext2*)Unsafe.AsPointer(ref this), pVideoProcessor, pEnabled, pSize);
} }
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputStereoMode" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputStereoMode" />
@@ -31445,9 +31445,9 @@ public unsafe partial struct ID3D11VideoContext3
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputConstriction" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputConstriction" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(31)] [VtblIndex(31)]
public void VideoProcessorSetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32 Enable, System.Drawing.Size* Size) public void VideoProcessorSetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32 Enable, System.Drawing.Size Size)
{ {
((delegate* unmanaged[Stdcall]<ID3D11VideoContext3*, ID3D11VideoProcessor*, Bool32, System.Drawing.Size*, void>)(lpVtbl[31]))((ID3D11VideoContext3*)Unsafe.AsPointer(ref this), pVideoProcessor, Enable, Size); ((delegate* unmanaged[Stdcall]<ID3D11VideoContext3*, ID3D11VideoProcessor*, Bool32, System.Drawing.Size, void>)(lpVtbl[31]))((ID3D11VideoContext3*)Unsafe.AsPointer(ref this), pVideoProcessor, Enable, Size);
} }
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputStereoMode" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorSetOutputStereoMode" />
@@ -31501,9 +31501,9 @@ public unsafe partial struct ID3D11VideoContext3
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputConstriction" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputConstriction" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(38)] [VtblIndex(38)]
public void VideoProcessorGetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32* pEnabled, System.Drawing.Size** pSize) public void VideoProcessorGetOutputConstriction(ID3D11VideoProcessor* pVideoProcessor, Bool32* pEnabled, System.Drawing.Size* pSize)
{ {
((delegate* unmanaged[Stdcall]<ID3D11VideoContext3*, ID3D11VideoProcessor*, Bool32*, System.Drawing.Size**, void>)(lpVtbl[38]))((ID3D11VideoContext3*)Unsafe.AsPointer(ref this), pVideoProcessor, pEnabled, pSize); ((delegate* unmanaged[Stdcall]<ID3D11VideoContext3*, ID3D11VideoProcessor*, Bool32*, System.Drawing.Size*, void>)(lpVtbl[38]))((ID3D11VideoContext3*)Unsafe.AsPointer(ref this), pVideoProcessor, pEnabled, pSize);
} }
/// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputStereoMode" /> /// <inheritdoc cref="ID3D11VideoContext.VideoProcessorGetOutputStereoMode" />

View File

@@ -2363,23 +2363,6 @@ public partial struct Panose
#endregion Unions #endregion Unions
#region Structs #region Structs
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_F"]/*' />
/// <unmanaged>DWRITE_COLOR_F</unmanaged>
public partial struct ColorF
{
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_F::r"]/*' />
public float r;
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_F::g"]/*' />
public float g;
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_F::b"]/*' />
public float b;
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_F::a"]/*' />
public float a;
}
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_FONT_METRICS"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_FONT_METRICS"]/*' />
/// <unmanaged>DWRITE_FONT_METRICS</unmanaged> /// <unmanaged>DWRITE_FONT_METRICS</unmanaged>
public partial struct FontMetrics public partial struct FontMetrics
@@ -2933,7 +2916,7 @@ public partial struct ColorGlyphRun
public float baselineOriginY; public float baselineOriginY;
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_GLYPH_RUN::runColor"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_GLYPH_RUN::runColor"]/*' />
public ColorF runColor; public Win32.Graphics.Direct2D.Common.ColorF runColor;
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_GLYPH_RUN::paletteIndex"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_COLOR_GLYPH_RUN::paletteIndex"]/*' />
public ushort paletteIndex; public ushort paletteIndex;
@@ -3018,7 +3001,7 @@ public partial struct GlyphImageData
public uint pixelsPerEm; public uint pixelsPerEm;
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_GLYPH_IMAGE_DATA::pixelSize"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_GLYPH_IMAGE_DATA::pixelSize"]/*' />
public Graphics.Direct2D.Common.SizeU pixelSize; public System.Drawing.Size pixelSize;
/// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_GLYPH_IMAGE_DATA::horizontalLeftOrigin"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="DWRITE_GLYPH_IMAGE_DATA::horizontalLeftOrigin"]/*' />
public System.Drawing.Point horizontalLeftOrigin; public System.Drawing.Point horizontalLeftOrigin;
@@ -6107,9 +6090,9 @@ public unsafe partial struct IDWriteBitmapRenderTarget
/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget::GetSize"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget::GetSize"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(9)] [VtblIndex(9)]
public HResult GetSize(System.Drawing.Size** size) public HResult GetSize(System.Drawing.Size* size)
{ {
return ((delegate* unmanaged[Stdcall]<IDWriteBitmapRenderTarget*, System.Drawing.Size**, int>)(lpVtbl[9]))((IDWriteBitmapRenderTarget*)Unsafe.AsPointer(ref this), size); return ((delegate* unmanaged[Stdcall]<IDWriteBitmapRenderTarget*, System.Drawing.Size*, int>)(lpVtbl[9]))((IDWriteBitmapRenderTarget*)Unsafe.AsPointer(ref this), size);
} }
/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget::Resize"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteBitmapRenderTarget::Resize"]/*' />
@@ -8475,9 +8458,9 @@ public unsafe partial struct IDWriteBitmapRenderTarget1
/// <inheritdoc cref="IDWriteBitmapRenderTarget.GetSize" /> /// <inheritdoc cref="IDWriteBitmapRenderTarget.GetSize" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(9)] [VtblIndex(9)]
public HResult GetSize(System.Drawing.Size** size) public HResult GetSize(System.Drawing.Size* size)
{ {
return ((delegate* unmanaged[Stdcall]<IDWriteBitmapRenderTarget1*, System.Drawing.Size**, int>)(lpVtbl[9]))((IDWriteBitmapRenderTarget1*)Unsafe.AsPointer(ref this), size); return ((delegate* unmanaged[Stdcall]<IDWriteBitmapRenderTarget1*, System.Drawing.Size*, int>)(lpVtbl[9]))((IDWriteBitmapRenderTarget1*)Unsafe.AsPointer(ref this), size);
} }
/// <inheritdoc cref="IDWriteBitmapRenderTarget.Resize" /> /// <inheritdoc cref="IDWriteBitmapRenderTarget.Resize" />
@@ -10523,9 +10506,9 @@ public unsafe partial struct IDWriteFontFace2
/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::GetPaletteEntries"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::GetPaletteEntries"]/*' />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(33)] [VtblIndex(33)]
public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, ColorF* paletteEntries) public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, Win32.Graphics.Direct2D.Common.ColorF** paletteEntries)
{ {
return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint, uint, uint, ColorF*, int>)(lpVtbl[33]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries); return ((delegate* unmanaged[Stdcall]<IDWriteFontFace2*, uint, uint, uint, Win32.Graphics.Direct2D.Common.ColorF**, int>)(lpVtbl[33]))((IDWriteFontFace2*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries);
} }
/// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::GetRecommendedRenderingMode"]/*' /> /// <include file='../DirectWrite.xml' path='doc/member[@name="IDWriteFontFace2::GetRecommendedRenderingMode"]/*' />
@@ -12585,9 +12568,9 @@ public unsafe partial struct IDWriteFontFace3
/// <inheritdoc cref="IDWriteFontFace2.GetPaletteEntries" /> /// <inheritdoc cref="IDWriteFontFace2.GetPaletteEntries" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(6)] [VtblIndex(6)]
public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, ColorF* paletteEntries) public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, Win32.Graphics.Direct2D.Common.ColorF** paletteEntries)
{ {
return ((delegate* unmanaged[Stdcall]<IDWriteFontFace3*, uint, uint, uint, ColorF*, int>)(lpVtbl[6]))((IDWriteFontFace3*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries); return ((delegate* unmanaged[Stdcall]<IDWriteFontFace3*, uint, uint, uint, Win32.Graphics.Direct2D.Common.ColorF**, int>)(lpVtbl[6]))((IDWriteFontFace3*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries);
} }
/// <inheritdoc cref="IDWriteFontFace2.GetRecommendedRenderingMode" /> /// <inheritdoc cref="IDWriteFontFace2.GetRecommendedRenderingMode" />
@@ -14681,9 +14664,9 @@ public unsafe partial struct IDWriteFontFace4
/// <inheritdoc cref="IDWriteFontFace2.GetPaletteEntries" /> /// <inheritdoc cref="IDWriteFontFace2.GetPaletteEntries" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(20)] [VtblIndex(20)]
public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, ColorF* paletteEntries) public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, Win32.Graphics.Direct2D.Common.ColorF** paletteEntries)
{ {
return ((delegate* unmanaged[Stdcall]<IDWriteFontFace4*, uint, uint, uint, ColorF*, int>)(lpVtbl[20]))((IDWriteFontFace4*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries); return ((delegate* unmanaged[Stdcall]<IDWriteFontFace4*, uint, uint, uint, Win32.Graphics.Direct2D.Common.ColorF**, int>)(lpVtbl[20]))((IDWriteFontFace4*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries);
} }
/// <inheritdoc cref="IDWriteFontFace2.GetRecommendedRenderingMode" /> /// <inheritdoc cref="IDWriteFontFace2.GetRecommendedRenderingMode" />
@@ -16943,9 +16926,9 @@ public unsafe partial struct IDWriteFontFace5
/// <inheritdoc cref="IDWriteFontFace2.GetPaletteEntries" /> /// <inheritdoc cref="IDWriteFontFace2.GetPaletteEntries" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(24)] [VtblIndex(24)]
public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, ColorF* paletteEntries) public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, Win32.Graphics.Direct2D.Common.ColorF** paletteEntries)
{ {
return ((delegate* unmanaged[Stdcall]<IDWriteFontFace5*, uint, uint, uint, ColorF*, int>)(lpVtbl[24]))((IDWriteFontFace5*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries); return ((delegate* unmanaged[Stdcall]<IDWriteFontFace5*, uint, uint, uint, Win32.Graphics.Direct2D.Common.ColorF**, int>)(lpVtbl[24]))((IDWriteFontFace5*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries);
} }
/// <inheritdoc cref="IDWriteFontFace2.GetRecommendedRenderingMode" /> /// <inheritdoc cref="IDWriteFontFace2.GetRecommendedRenderingMode" />
@@ -21001,9 +20984,9 @@ public unsafe partial struct IDWriteFontFace6
/// <inheritdoc cref="IDWriteFontFace2.GetPaletteEntries" /> /// <inheritdoc cref="IDWriteFontFace2.GetPaletteEntries" />
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(29)] [VtblIndex(29)]
public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, ColorF* paletteEntries) public HResult GetPaletteEntries(uint colorPaletteIndex, uint firstEntryIndex, uint entryCount, Win32.Graphics.Direct2D.Common.ColorF** paletteEntries)
{ {
return ((delegate* unmanaged[Stdcall]<IDWriteFontFace6*, uint, uint, uint, ColorF*, int>)(lpVtbl[29]))((IDWriteFontFace6*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries); return ((delegate* unmanaged[Stdcall]<IDWriteFontFace6*, uint, uint, uint, Win32.Graphics.Direct2D.Common.ColorF**, int>)(lpVtbl[29]))((IDWriteFontFace6*)Unsafe.AsPointer(ref this), colorPaletteIndex, firstEntryIndex, entryCount, paletteEntries);
} }
/// <inheritdoc cref="IDWriteFontFace2.GetRecommendedRenderingMode" /> /// <inheritdoc cref="IDWriteFontFace2.GetRecommendedRenderingMode" />

View File

@@ -0,0 +1,76 @@
// Copyright © Amer Koleci and Contributors.
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
namespace Win32.Graphics.Direct2D;
public unsafe partial struct ID2D1Effect
{
public HResult SetValueByName<T>(ReadOnlySpan<char> name, ReadOnlySpan<T> data)
where T : unmanaged
{
fixed (char* namePtr = name)
{
fixed (T* dataPtr = data)
{
return SetValueByName((ushort*)namePtr, PropertyType.Unknown, (byte*)dataPtr, (uint)(data.Length * sizeof(T)));
}
}
}
public HResult SetValueByName(ReadOnlySpan<char> name, byte* data, uint dataSize)
{
fixed (char* namePtr = name)
{
return SetValueByName((ushort*)namePtr, PropertyType.Unknown, data, dataSize);
}
}
public HResult SetValueByName(ushort* name, byte* data, uint dataSize)
{
return SetValueByName(name, PropertyType.Unknown, data, dataSize);
}
public HResult SetValue(uint index, byte* data, uint dataSize)
{
return SetValue(index, PropertyType.Unknown, data, dataSize);
}
public HResult GetValueByName(ushort* name, byte* data, uint dataSize)
{
return GetValueByName(name, PropertyType.Unknown, data, dataSize);
}
public HResult GetValueByName(ReadOnlySpan<char> name, byte* data, uint dataSize)
{
fixed (char* namePtr = name)
{
return GetValueByName((ushort*)namePtr, PropertyType.Unknown, data, dataSize);
}
}
public HResult GetValue(uint index, byte* data, uint dataSize)
{
return GetValue(index, PropertyType.Unknown, data, dataSize);
}
public void SetInput(uint index, ID2D1Image* input)
{
SetInput(index, input, 1);
}
public void SetInputEffect(uint index, ID2D1Effect* inputEffect, bool invalidate = true)
{
ID2D1Image* output = null;
if (inputEffect != null)
{
inputEffect->GetOutput(&output);
}
SetInput(index, output, invalidate);
if (output != null)
{
_ = output->Release();
}
}
}

View File

@@ -0,0 +1,86 @@
// Copyright © Amer Koleci and Contributors.
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
using System.Drawing;
using Win32.Graphics.Direct2D.Common;
using Win32.Graphics.Imaging;
namespace Win32.Graphics.Direct2D;
public unsafe partial struct ID2D1RenderTarget
{
public HResult CreateBitmap(Size size, BitmapProperties* bitmapProperties, ID2D1Bitmap** bitmap)
{
return CreateBitmap(size, null, 0, bitmapProperties, bitmap);
}
public HResult CreateBitmapFromWicBitmap(IWICBitmapSource* wicBitmapSource, ID2D1Bitmap** bitmap)
{
return CreateBitmapFromWicBitmap(wicBitmapSource, null, bitmap);
}
public HResult CreateBitmapBrush(ID2D1Bitmap* bitmap, ID2D1BitmapBrush** bitmapBrush)
{
return CreateBitmapBrush(bitmap, null, null, bitmapBrush);
}
public HResult CreateBitmapBrush(ID2D1Bitmap* bitmap, BitmapBrushProperties* bitmapBrushProperties, ID2D1BitmapBrush** bitmapBrush)
{
return CreateBitmapBrush(bitmap, bitmapBrushProperties, null, bitmapBrush);
}
public HResult CreateSolidColorBrush(ColorF* color, ID2D1SolidColorBrush** solidColorBrush)
{
return CreateSolidColorBrush(color, null, solidColorBrush);
}
public HResult CreateGradientStopCollection(GradientStop* gradientStops, uint gradientStopsCount, ID2D1GradientStopCollection** gradientStopCollection)
{
return CreateGradientStopCollection(gradientStops, gradientStopsCount, Gamma.Gamma_2_2, ExtendMode.Clamp, gradientStopCollection);
}
public HResult CreateLinearGradientBrush(LinearGradientBrushProperties* linearGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1LinearGradientBrush** linearGradientBrush)
{
return CreateLinearGradientBrush(linearGradientBrushProperties, null, gradientStopCollection, linearGradientBrush);
}
public HResult CreateRadialGradientBrush(RadialGradientBrushProperties* radialGradientBrushProperties, ID2D1GradientStopCollection* gradientStopCollection, ID2D1RadialGradientBrush** radialGradientBrush)
{
return CreateRadialGradientBrush(radialGradientBrushProperties, null, gradientStopCollection, radialGradientBrush);
}
public HResult CreateCompatibleRenderTarget(ID2D1BitmapRenderTarget** bitmapRenderTarget)
{
return CreateCompatibleRenderTarget(null, null, null, CompatibleRenderTargetOptions.None, bitmapRenderTarget);
}
public HResult CreateCompatibleRenderTarget(SizeF desiredSize, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{
return CreateCompatibleRenderTarget(&desiredSize, null, null, CompatibleRenderTargetOptions.None, bitmapRenderTarget);
}
public HResult CreateCompatibleRenderTarget(SizeF desiredSize, Size desiredPixelSize, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{
return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, null, CompatibleRenderTargetOptions.None, bitmapRenderTarget);
}
public HResult CreateCompatibleRenderTarget(SizeF desiredSize, Size desiredPixelSize, PixelFormat desiredFormat, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{
return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, CompatibleRenderTargetOptions.None, bitmapRenderTarget);
}
public HResult CreateCompatibleRenderTarget(SizeF desiredSize, Size desiredPixelSize, PixelFormat desiredFormat, CompatibleRenderTargetOptions options, ID2D1BitmapRenderTarget** bitmapRenderTarget)
{
return CreateCompatibleRenderTarget(&desiredSize, &desiredPixelSize, &desiredFormat, options, bitmapRenderTarget);
}
public HResult CreateLayer(SizeF size, ID2D1Layer** layer)
{
return CreateLayer(&size, layer);
}
public HResult CreateLayer(ID2D1Layer** layer)
{
return CreateLayer(null, layer);
}
}

View File

@@ -3,13 +3,9 @@
namespace Win32.Graphics.Direct3D11; namespace Win32.Graphics.Direct3D11;
/// <summary> public unsafe partial struct ID3D11Device
/// A <see langword="class"/> with extensions for the <see cref="ID3D11Device"/> type.
/// </summary>
public static unsafe class ID3D11DeviceExtensions
{ {
public static ComPtr<ID3D11Buffer> CreateBuffer<T>( public ComPtr<ID3D11Buffer> CreateBuffer<T>(
this ref ID3D11Device device,
in T data, in T data,
BufferDescription description) where T : unmanaged BufferDescription description) where T : unmanaged
{ {
@@ -24,12 +20,12 @@ public static unsafe class ID3D11DeviceExtensions
}; };
using ComPtr<ID3D11Buffer> buffer = default; using ComPtr<ID3D11Buffer> buffer = default;
device.CreateBuffer(&description, &subresourceData, buffer.GetAddressOf()).ThrowIfFailed(); CreateBuffer(&description, &subresourceData, buffer.GetAddressOf()).ThrowIfFailed();
return buffer.Move(); return buffer.Move();
} }
} }
public static ComPtr<ID3D11Buffer> CreateBuffer<T>(this ref ID3D11Device device, ReadOnlySpan<T> data, BufferDescription description) where T : unmanaged public ComPtr<ID3D11Buffer> CreateBuffer<T>(ReadOnlySpan<T> data, BufferDescription description) where T : unmanaged
{ {
if (description.ByteWidth == 0) if (description.ByteWidth == 0)
description.ByteWidth = (uint)(sizeof(T) * data.Length); description.ByteWidth = (uint)(sizeof(T) * data.Length);
@@ -42,7 +38,7 @@ public static unsafe class ID3D11DeviceExtensions
}; };
using ComPtr<ID3D11Buffer> buffer = default; using ComPtr<ID3D11Buffer> buffer = default;
device.CreateBuffer(&description, &subresourceData, buffer.GetAddressOf()).ThrowIfFailed(); CreateBuffer(&description, &subresourceData, buffer.GetAddressOf()).ThrowIfFailed();
return buffer.Move(); return buffer.Move();
} }
} }
@@ -60,8 +56,7 @@ public static unsafe class ID3D11DeviceExtensions
/// <param name="miscFlags">Miscellaneous resource options.</param> /// <param name="miscFlags">Miscellaneous resource options.</param>
/// <param name="structureByteStride">The size (in bytes) of the structure element for structured buffers.</param> /// <param name="structureByteStride">The size (in bytes) of the structure element for structured buffers.</param>
/// <returns>An initialized buffer</returns> /// <returns>An initialized buffer</returns>
public static ComPtr<ID3D11Buffer> CreateBuffer<T>( public ComPtr<ID3D11Buffer> CreateBuffer<T>(
this ref ID3D11Device device,
ReadOnlySpan<T> data, ReadOnlySpan<T> data,
BindFlags bindFlags, BindFlags bindFlags,
Usage usage = Usage.Default, Usage usage = Usage.Default,
@@ -88,7 +83,7 @@ public static unsafe class ID3D11DeviceExtensions
}; };
using ComPtr<ID3D11Buffer> buffer = default; using ComPtr<ID3D11Buffer> buffer = default;
device.CreateBuffer(&description, &subresourceData, buffer.GetAddressOf()).ThrowIfFailed(); CreateBuffer(&description, &subresourceData, buffer.GetAddressOf()).ThrowIfFailed();
return buffer.Move(); return buffer.Move();
} }
} }

View File

@@ -0,0 +1,17 @@
// Copyright © Amer Koleci and Contributors.
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
using Win32.Graphics.Dxgi;
namespace Win32.Graphics.Direct3D12;
public unsafe partial struct ID3D12Device
{
public TFeature CheckFeatureSupport<TFeature>(Feature feature)
where TFeature : unmanaged
{
TFeature featureData = default;
CheckFeatureSupport(feature, &featureData, (uint)sizeof(TFeature)).ThrowIfFailed();
return featureData;
}
}

View File

@@ -1,20 +0,0 @@
// Copyright © Amer Koleci and Contributors.
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
using Win32.Graphics.Dxgi;
namespace Win32.Graphics.Direct3D12;
/// <summary>
/// A <see langword="class"/> with extensions for the <see cref="ID3D12Device"/> type.
/// </summary>
public static unsafe class ID3D12DeviceExtensions
{
public static TFeature CheckFeatureSupport<TFeature>(this ref ID3D12Device device, Feature feature)
where TFeature : unmanaged
{
TFeature featureData = default;
device.CheckFeatureSupport(feature, &featureData, (uint)sizeof(TFeature)).ThrowIfFailed();
return featureData;
}
}

View File

@@ -6,13 +6,9 @@ using Win32.Graphics.Imaging;
namespace Win32.Graphics.DirectWrite; namespace Win32.Graphics.DirectWrite;
/// <summary> public unsafe partial struct IDWriteFactory
/// A <see langword="class"/> with extensions for the <see cref="IDWriteFactory"/> type.
/// </summary>
public static unsafe class IDWriteFactoryExtensions
{ {
public static ComPtr<IDWriteTextFormat> CreateTextFormat( public ComPtr<IDWriteTextFormat> CreateTextFormat(
this ref IDWriteFactory factory,
ReadOnlySpan<char> fontFamilyName, ReadOnlySpan<char> fontFamilyName,
float fontSize, float fontSize,
FontWeight fontWeight = FontWeight.Normal, FontWeight fontWeight = FontWeight.Normal,
@@ -23,7 +19,7 @@ public static unsafe class IDWriteFactoryExtensions
fixed (char* fontFamilyNamePtr = fontFamilyName) fixed (char* fontFamilyNamePtr = fontFamilyName)
{ {
factory.CreateTextFormat( CreateTextFormat(
(ushort*)fontFamilyNamePtr, (ushort*)fontFamilyNamePtr,
null, null,
fontWeight, fontWeight,
@@ -37,8 +33,7 @@ public static unsafe class IDWriteFactoryExtensions
} }
} }
public static ComPtr<IDWriteTextFormat> CreateTextFormat( public ComPtr<IDWriteTextFormat> CreateTextFormat(
this ref IDWriteFactory factory,
ReadOnlySpan<char> fontFamilyName, ReadOnlySpan<char> fontFamilyName,
float fontSize, float fontSize,
ReadOnlySpan<char> localeName, ReadOnlySpan<char> localeName,
@@ -52,7 +47,7 @@ public static unsafe class IDWriteFactoryExtensions
{ {
fixed (char* localeNamePtr = localeName) fixed (char* localeNamePtr = localeName)
{ {
factory.CreateTextFormat( CreateTextFormat(
(ushort*)fontFamilyNamePtr, (ushort*)fontFamilyNamePtr,
null, null,
fontWeight, fontWeight,
@@ -67,8 +62,7 @@ public static unsafe class IDWriteFactoryExtensions
} }
} }
public static ComPtr<IDWriteTextFormat> CreateTextFormat( public ComPtr<IDWriteTextFormat> CreateTextFormat(
this ref IDWriteFactory factory,
ReadOnlySpan<char> fontFamilyName, ReadOnlySpan<char> fontFamilyName,
IDWriteFontCollection* fontCollection, IDWriteFontCollection* fontCollection,
float fontSize, float fontSize,
@@ -83,7 +77,7 @@ public static unsafe class IDWriteFactoryExtensions
{ {
fixed (char* localeNamePtr = localeName) fixed (char* localeNamePtr = localeName)
{ {
factory.CreateTextFormat( CreateTextFormat(
(ushort*)fontFamilyNamePtr, (ushort*)fontFamilyNamePtr,
fontCollection, fontCollection,
fontWeight, fontWeight,

View File

@@ -0,0 +1,27 @@
// Copyright © Amer Koleci and Contributors.
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
using System.Drawing;
namespace Win32.Graphics.Imaging;
public unsafe partial struct IWICBitmapSource
{
public HResult CopyPixels<T>(int stride, ReadOnlySpan<T> data)
where T : unmanaged
{
fixed (T* dataPtr = data)
{
return CopyPixels(null, (uint)stride, (uint)(data.Length * sizeof(T)), (byte*)dataPtr);
}
}
public HResult CopyPixels<T>(Rectangle rect, int stride, ReadOnlySpan<T> data)
where T : unmanaged
{
fixed (T* dataPtr = data)
{
return CopyPixels(&rect, (uint)stride, (uint)(data.Length * sizeof(T)), (byte*)dataPtr);
}
}
}

View File

@@ -1,30 +0,0 @@
// Copyright © Amer Koleci and Contributors.
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
using System.Drawing;
namespace Win32.Graphics.Imaging;
/// <summary>
/// A <see langword="class"/> with extensions for the <see cref="IWICBitmapSource"/> type.
/// </summary>
public static unsafe class IWICBitmapSourceExtensions
{
public static HResult CopyPixels<T>(this ref IWICBitmapSource source, int stride, ReadOnlySpan<T> data)
where T : unmanaged
{
fixed (T* dataPtr = data)
{
return source.CopyPixels(null, (uint)stride, (uint)(data.Length * sizeof(T)), (byte*)dataPtr);
}
}
public static HResult CopyPixels<T>(this ref IWICBitmapSource source, Rectangle rect, int stride, ReadOnlySpan<T> data)
where T : unmanaged
{
fixed (T* dataPtr = data)
{
return source.CopyPixels(&rect, (uint)stride, (uint)(data.Length * sizeof(T)), (byte*)dataPtr);
}
}
}

View File

@@ -3,22 +3,17 @@
namespace Win32.Graphics.Imaging; namespace Win32.Graphics.Imaging;
/// <summary> public unsafe partial struct IWICImagingFactory
/// A <see langword="class"/> with extensions for the <see cref="IWICImagingFactory"/> type.
/// </summary>
public static unsafe class IWICImagingFactoryExtensions
{ {
public static ComPtr<IWICBitmapDecoder> CreateDecoderFromFilename( public ComPtr<IWICBitmapDecoder> CreateDecoderFromFilename(
this ref IWICImagingFactory factory,
string filename, string filename,
FileAccess desiredAccess = FileAccess.Read, FileAccess desiredAccess = FileAccess.Read,
WICDecodeOptions metadataOptions = WICDecodeOptions.CacheOnDemand) WICDecodeOptions metadataOptions = WICDecodeOptions.CacheOnDemand)
{ {
return CreateDecoderFromFilename(ref factory, filename.AsSpan(), desiredAccess, metadataOptions); return CreateDecoderFromFilename(filename.AsSpan(), desiredAccess, metadataOptions);
} }
public static ComPtr<IWICBitmapDecoder> CreateDecoderFromFilename( public ComPtr<IWICBitmapDecoder> CreateDecoderFromFilename(
this ref IWICImagingFactory factory,
ReadOnlySpan<char> filename, ReadOnlySpan<char> filename,
FileAccess desiredAccess = FileAccess.Read, FileAccess desiredAccess = FileAccess.Read,
WICDecodeOptions metadataOptions = WICDecodeOptions.CacheOnDemand) WICDecodeOptions metadataOptions = WICDecodeOptions.CacheOnDemand)
@@ -29,7 +24,7 @@ public static unsafe class IWICImagingFactoryExtensions
fixed (char* filenamePtr = filename) fixed (char* filenamePtr = filename)
{ {
factory.CreateDecoderFromFilename( CreateDecoderFromFilename(
(ushort*)filenamePtr, (ushort*)filenamePtr,
null, null,
nativeAccess, nativeAccess,

View File

@@ -82,6 +82,9 @@ public static unsafe class Program
private static void TestD2D1AndDWrite() private static void TestD2D1AndDWrite()
{ {
using ComPtr<ID2D1Effect> effect = default;
//effect.Get()->SetInput();
using ComPtr<ID2D1Factory2> d2d1Factory2 = default; using ComPtr<ID2D1Factory2> d2d1Factory2 = default;
D2D1CreateFactory(FactoryType.MultiThreaded, D2D1CreateFactory(FactoryType.MultiThreaded,