From c1d457d5fd2485a66421889fff16e562774936d3 Mon Sep 17 00:00:00 2001 From: Amer Koleci Date: Tue, 6 Dec 2022 10:57:28 +0100 Subject: [PATCH] Improve D2D1 types generation and other helper methods. --- Directory.Build.props | 2 +- src/Generator/Program.cs | 2 +- .../BitmapBrushProperties.cs | 17 +++ .../BitmapBrushProperties1.cs | 17 +++ .../BitmapProperties.cs | 16 +++ .../BitmapProperties1.cs | 20 +++ .../BrushProperties.cs | 21 ++++ .../Graphics.Direct2D.Apis.Functions.cs | 6 +- .../Generated/Graphics.Direct2D.Structs.cs | 66 +++++----- .../Generated/ID2D1BitmapRenderTarget.cs | 12 +- .../Generated/ID2D1CommandSink.cs | 24 ++-- .../Generated/ID2D1CommandSink1.cs | 16 +-- .../Generated/ID2D1CommandSink2.cs | 16 +-- .../Generated/ID2D1CommandSink3.cs | 16 +-- .../Generated/ID2D1CommandSink4.cs | 16 +-- .../Generated/ID2D1CommandSink5.cs | 22 ++-- .../Generated/ID2D1DCRenderTarget.cs | 12 +- .../Generated/ID2D1DeviceContext.cs | 36 +++--- .../Generated/ID2D1DeviceContext1.cs | 28 ++--- .../Generated/ID2D1DeviceContext2.cs | 28 ++--- .../Generated/ID2D1DeviceContext3.cs | 28 ++--- .../Generated/ID2D1DeviceContext4.cs | 58 ++++----- .../Generated/ID2D1DeviceContext5.cs | 48 +++---- .../Generated/ID2D1DeviceContext6.cs | 54 ++++---- .../Generated/ID2D1EllipseGeometry.cs | 12 +- .../Generated/ID2D1Geometry.cs | 18 +-- .../Generated/ID2D1GeometryGroup.cs | 12 +- .../Generated/ID2D1GeometrySink.cs | 14 +-- .../Generated/ID2D1HwndRenderTarget.cs | 12 +- .../Generated/ID2D1LinearGradientBrush.cs | 28 ++--- .../Generated/ID2D1PathGeometry.cs | 12 +- .../Generated/ID2D1PathGeometry1.cs | 12 +- .../Generated/ID2D1RadialGradientBrush.cs | 28 ++--- .../Generated/ID2D1RectangleGeometry.cs | 12 +- .../Generated/ID2D1RenderTarget.cs | 18 +-- .../ID2D1RoundedRectangleGeometry.cs | 12 +- .../Generated/ID2D1SvgDocument.cs | 6 +- .../Generated/ID2D1SvgPointCollection.cs | 12 +- .../Generated/ID2D1TransformedGeometry.cs | 12 +- .../GradientStop.cs | 13 ++ .../HwndRenderTargetProperties.cs | 19 +++ .../ID2D1DeviceContext.cs | 74 +++++++++-- .../ID2D1Effect.cs | 60 --------- .../ID2D1Properties.cs | 117 +++++++++++------- .../ImageBrushProperties.cs | 20 +++ .../LinearGradientBrushProperties.cs | 13 ++ .../RadialGradientBrushProperties.cs | 18 +++ .../RenderTargetProperties.cs | 25 ++++ .../Apis.cs | 3 - .../Generated/IDWriteFactory4.cs | 18 +-- .../Generated/IDWriteFactory5.cs | 12 +- .../Generated/IDWriteFactory6.cs | 12 +- .../Generated/IDWriteFactory7.cs | 12 +- .../Graphics.Direct2D.Common.Structs.cs | 6 +- .../ID2D1SimplifiedGeometrySink.cs | 12 +- .../Graphics/Direct2D/PixelFormat.cs | 6 +- 56 files changed, 733 insertions(+), 508 deletions(-) create mode 100644 src/Vortice.Win32.Graphics.Direct2D/BitmapBrushProperties.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/BitmapBrushProperties1.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/BitmapProperties.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/BitmapProperties1.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/BrushProperties.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/GradientStop.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/HwndRenderTargetProperties.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/ImageBrushProperties.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/LinearGradientBrushProperties.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/RadialGradientBrushProperties.cs create mode 100644 src/Vortice.Win32.Graphics.Direct2D/RenderTargetProperties.cs diff --git a/Directory.Build.props b/Directory.Build.props index 7ebb9da..396cdba 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,7 +14,7 @@ true $(MSBuildThisFileDirectory)NuGet.config - 1.9.2 + 1.9.3 true diff --git a/src/Generator/Program.cs b/src/Generator/Program.cs index 0783173..255d105 100644 --- a/src/Generator/Program.cs +++ b/src/Generator/Program.cs @@ -104,7 +104,7 @@ public static class Program { "Graphics.Direct2D.Common.D2D_MATRIX_4X3_F", "Matrix4x3" }, { "Graphics.Direct2D.Common.D2D_MATRIX_4X4_F", "Matrix4x4" }, { "Graphics.Direct2D.Common.D2D_MATRIX_5X4_F", "Matrix5x4" }, - { "Graphics.Direct2D.Common.D2D_POINT_2F", "System.Drawing.PointF" }, + { "Graphics.Direct2D.Common.D2D_POINT_2F", "Vector2" }, { "Graphics.Direct2D.Common.D2D_VECTOR_2F", "Vector2" }, { "Graphics.Direct2D.Common.D2D_VECTOR_3F", "Vector3" }, { "Graphics.Direct2D.Common.D2D_VECTOR_4F", "Vector4" }, diff --git a/src/Vortice.Win32.Graphics.Direct2D/BitmapBrushProperties.cs b/src/Vortice.Win32.Graphics.Direct2D/BitmapBrushProperties.cs new file mode 100644 index 0000000..1c69e2b --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/BitmapBrushProperties.cs @@ -0,0 +1,17 @@ +// 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 partial struct BitmapBrushProperties +{ + public BitmapBrushProperties( + ExtendMode extendModeX = ExtendMode.Clamp, + ExtendMode extendModeY = ExtendMode.Clamp, + BitmapInterpolationMode interpolationMode = BitmapInterpolationMode.Linear) + { + this.extendModeX = extendModeX; + this.extendModeY = extendModeY; + this.interpolationMode = interpolationMode; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/BitmapBrushProperties1.cs b/src/Vortice.Win32.Graphics.Direct2D/BitmapBrushProperties1.cs new file mode 100644 index 0000000..deeeee3 --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/BitmapBrushProperties1.cs @@ -0,0 +1,17 @@ +// 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 partial struct BitmapBrushProperties1 +{ + public BitmapBrushProperties1( + ExtendMode extendModeX = ExtendMode.Clamp, + ExtendMode extendModeY = ExtendMode.Clamp, + InterpolationMode interpolationMode = InterpolationMode.Linear) + { + this.extendModeX = extendModeX; + this.extendModeY = extendModeY; + this.interpolationMode = interpolationMode; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/BitmapProperties.cs b/src/Vortice.Win32.Graphics.Direct2D/BitmapProperties.cs new file mode 100644 index 0000000..f9c0a58 --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/BitmapProperties.cs @@ -0,0 +1,16 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using Win32.Graphics.Direct2D.Common; + +namespace Win32.Graphics.Direct2D; + +public partial struct BitmapProperties +{ + public BitmapProperties(PixelFormat pixelFormat = default, float dpiX = 96.0f, float dpiY = 96.0f) + { + this.pixelFormat = pixelFormat; + this.dpiX = dpiX; + this.dpiY = dpiY; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/BitmapProperties1.cs b/src/Vortice.Win32.Graphics.Direct2D/BitmapProperties1.cs new file mode 100644 index 0000000..47ef677 --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/BitmapProperties1.cs @@ -0,0 +1,20 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using Win32.Graphics.Direct2D.Common; + +namespace Win32.Graphics.Direct2D; + +public partial struct BitmapProperties1 +{ + public unsafe BitmapProperties1( + BitmapOptions bitmapOptions = BitmapOptions.None, + PixelFormat pixelFormat = default, float dpiX = 96.0f, float dpiY = 96.0f, ID2D1ColorContext* colorContext = null) + { + this.pixelFormat = pixelFormat; + this.dpiX = dpiX; + this.dpiY = dpiY; + this.bitmapOptions = bitmapOptions; + this.colorContext = colorContext; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/BrushProperties.cs b/src/Vortice.Win32.Graphics.Direct2D/BrushProperties.cs new file mode 100644 index 0000000..6f0fabe --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/BrushProperties.cs @@ -0,0 +1,21 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using Win32.Graphics.Direct2D.Common; + +namespace Win32.Graphics.Direct2D; + +public partial struct BrushProperties +{ + public BrushProperties(float opacity = 1.0f) + { + this.opacity = opacity; + transform = Matrix3x2.Identity; + } + + public BrushProperties(float opacity, in Matrix3x2 transform) + { + this.opacity = opacity; + this.transform = transform; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/Graphics.Direct2D.Apis.Functions.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/Graphics.Direct2D.Apis.Functions.cs index 0ee19be..7ae78cc 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/Graphics.Direct2D.Apis.Functions.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/Graphics.Direct2D.Apis.Functions.cs @@ -17,11 +17,11 @@ public static unsafe partial class Apis /// [DllImport("d2d1.dll", ExactSpelling = true)] - public static extern void D2D1MakeRotateMatrix(float angle, System.Drawing.PointF center, Matrix3x2* matrix); + public static extern void D2D1MakeRotateMatrix(float angle, Vector2 center, Matrix3x2* matrix); /// [DllImport("d2d1.dll", ExactSpelling = true)] - public static extern void D2D1MakeSkewMatrix(float angleX, float angleY, System.Drawing.PointF center, Matrix3x2* matrix); + public static extern void D2D1MakeSkewMatrix(float angleX, float angleY, Vector2 center, Matrix3x2* matrix); /// [DllImport("d2d1.dll", ExactSpelling = true)] @@ -61,5 +61,5 @@ public static unsafe partial class Apis /// [DllImport("d2d1.dll", ExactSpelling = true)] - public static extern void D2D1GetGradientMeshInteriorPointsFromCoonsPatch(System.Drawing.PointF* pPoint0, System.Drawing.PointF* pPoint1, System.Drawing.PointF* pPoint2, System.Drawing.PointF* pPoint3, System.Drawing.PointF* pPoint4, System.Drawing.PointF* pPoint5, System.Drawing.PointF* pPoint6, System.Drawing.PointF* pPoint7, System.Drawing.PointF* pPoint8, System.Drawing.PointF* pPoint9, System.Drawing.PointF* pPoint10, System.Drawing.PointF* pPoint11, System.Drawing.PointF* pTensorPoint11, System.Drawing.PointF* pTensorPoint12, System.Drawing.PointF* pTensorPoint21, System.Drawing.PointF* pTensorPoint22); + public static extern void D2D1GetGradientMeshInteriorPointsFromCoonsPatch(Vector2* pPoint0, Vector2* pPoint1, Vector2* pPoint2, Vector2* pPoint3, Vector2* pPoint4, Vector2* pPoint5, Vector2* pPoint6, Vector2* pPoint7, Vector2* pPoint8, Vector2* pPoint9, Vector2* pPoint10, Vector2* pPoint11, Vector2* pTensorPoint11, Vector2* pTensorPoint12, Vector2* pTensorPoint21, Vector2* pTensorPoint22); } diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/Graphics.Direct2D.Structs.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/Graphics.Direct2D.Structs.cs index a8d5d9b..bc21d94 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/Graphics.Direct2D.Structs.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/Graphics.Direct2D.Structs.cs @@ -64,10 +64,10 @@ public partial struct BitmapBrushProperties public partial struct LinearGradientBrushProperties { /// - public System.Drawing.PointF startPoint; + public Vector2 startPoint; /// - public System.Drawing.PointF endPoint; + public Vector2 endPoint; } /// @@ -75,10 +75,10 @@ public partial struct LinearGradientBrushProperties public partial struct RadialGradientBrushProperties { /// - public System.Drawing.PointF center; + public Vector2 center; /// - public System.Drawing.PointF gradientOriginOffset; + public Vector2 gradientOriginOffset; /// public float radiusX; @@ -92,13 +92,13 @@ public partial struct RadialGradientBrushProperties public partial struct Triangle { /// - public System.Drawing.PointF point1; + public Vector2 point1; /// - public System.Drawing.PointF point2; + public Vector2 point2; /// - public System.Drawing.PointF point3; + public Vector2 point3; } /// @@ -106,7 +106,7 @@ public partial struct Triangle public partial struct ArcSegment { /// - public System.Drawing.PointF point; + public Vector2 point; /// public System.Drawing.SizeF size; @@ -126,10 +126,10 @@ public partial struct ArcSegment public partial struct QuadraticBezierSegment { /// - public System.Drawing.PointF point1; + public Vector2 point1; /// - public System.Drawing.PointF point2; + public Vector2 point2; } /// @@ -137,7 +137,7 @@ public partial struct QuadraticBezierSegment public partial struct Ellipse { /// - public System.Drawing.PointF point; + public Vector2 point; /// public float radiusX; @@ -338,10 +338,10 @@ public partial struct EffectInputDescription public partial struct PointDescription { /// - public System.Drawing.PointF point; + public Vector2 point; /// - public System.Drawing.PointF unitTangentVector; + public Vector2 unitTangentVector; /// public uint endSegment; @@ -757,52 +757,52 @@ public partial struct InkStyleProperties public partial struct GradientMeshPatch { /// - public System.Drawing.PointF point00; + public Vector2 point00; /// - public System.Drawing.PointF point01; + public Vector2 point01; /// - public System.Drawing.PointF point02; + public Vector2 point02; /// - public System.Drawing.PointF point03; + public Vector2 point03; /// - public System.Drawing.PointF point10; + public Vector2 point10; /// - public System.Drawing.PointF point11; + public Vector2 point11; /// - public System.Drawing.PointF point12; + public Vector2 point12; /// - public System.Drawing.PointF point13; + public Vector2 point13; /// - public System.Drawing.PointF point20; + public Vector2 point20; /// - public System.Drawing.PointF point21; + public Vector2 point21; /// - public System.Drawing.PointF point22; + public Vector2 point22; /// - public System.Drawing.PointF point23; + public Vector2 point23; /// - public System.Drawing.PointF point30; + public Vector2 point30; /// - public System.Drawing.PointF point31; + public Vector2 point31; /// - public System.Drawing.PointF point32; + public Vector2 point32; /// - public System.Drawing.PointF point33; + public Vector2 point33; /// public Color4 color00; @@ -834,16 +834,16 @@ public partial struct GradientMeshPatch public partial struct SimpleColorProfile { /// - public System.Drawing.PointF redPrimary; + public Vector2 redPrimary; /// - public System.Drawing.PointF greenPrimary; + public Vector2 greenPrimary; /// - public System.Drawing.PointF bluePrimary; + public Vector2 bluePrimary; /// - public System.Drawing.PointF whitePointXZ; + public Vector2 whitePointXZ; /// public Gamma1 gamma; diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1BitmapRenderTarget.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1BitmapRenderTarget.cs index dfedfad..ff02fa2 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1BitmapRenderTarget.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1BitmapRenderTarget.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1BitmapRenderTarget : ID2D1BitmapRenderTarget.I /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1BitmapRenderTarget : ID2D1BitmapRenderTarget.I /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1BitmapRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink.cs index 62b3b71..689ae6e 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink.cs @@ -157,17 +157,17 @@ public unsafe partial struct ID2D1CommandSink : ID2D1CommandSink.Interface, INat /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - public HResult DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public HResult DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] - public HResult DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public HResult DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -197,17 +197,17 @@ public unsafe partial struct ID2D1CommandSink : ID2D1CommandSink.Interface, INat /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(18)] - public HResult DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public HResult DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(19)] - public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// @@ -307,10 +307,10 @@ public unsafe partial struct ID2D1CommandSink : ID2D1CommandSink.Interface, INat HResult Clear(Color4* color); [VtblIndex(13)] - HResult DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode); + HResult DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode); [VtblIndex(14)] - HResult DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); + HResult DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); [VtblIndex(15)] HResult DrawGeometry(ID2D1Geometry* geometry, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); @@ -322,10 +322,10 @@ public unsafe partial struct ID2D1CommandSink : ID2D1CommandSink.Interface, INat HResult DrawBitmap(ID2D1Bitmap* bitmap, Common.RectF* destinationRectangle, float opacity, InterpolationMode interpolationMode, Common.RectF* sourceRectangle, Matrix4x4* perspectiveTransform); [VtblIndex(18)] - HResult DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode); + HResult DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode); [VtblIndex(19)] - HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset); + HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset); [VtblIndex(20)] HResult FillMesh(ID2D1Mesh* mesh, ID2D1Brush* brush); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink1.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink1.cs index af2c68e..f862497 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink1.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink1.cs @@ -157,17 +157,17 @@ public unsafe partial struct ID2D1CommandSink1 : ID2D1CommandSink1.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - public HResult DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public HResult DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink1*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink1*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] - public HResult DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public HResult DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink1*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink1*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -197,17 +197,17 @@ public unsafe partial struct ID2D1CommandSink1 : ID2D1CommandSink1.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(18)] - public HResult DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public HResult DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink1*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink1*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(19)] - public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink1*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink1*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink2.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink2.cs index ce2c33a..3f6cfaa 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink2.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink2.cs @@ -157,17 +157,17 @@ public unsafe partial struct ID2D1CommandSink2 : ID2D1CommandSink2.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - public HResult DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public HResult DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] - public HResult DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public HResult DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -197,17 +197,17 @@ public unsafe partial struct ID2D1CommandSink2 : ID2D1CommandSink2.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(18)] - public HResult DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public HResult DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(19)] - public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink2*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink3.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink3.cs index d95bbc8..9a1d115 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink3.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink3.cs @@ -157,17 +157,17 @@ public unsafe partial struct ID2D1CommandSink3 : ID2D1CommandSink3.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - public HResult DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public HResult DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink3*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink3*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] - public HResult DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public HResult DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink3*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink3*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -197,17 +197,17 @@ public unsafe partial struct ID2D1CommandSink3 : ID2D1CommandSink3.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(18)] - public HResult DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public HResult DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink3*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink3*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(19)] - public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink3*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink3*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink4.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink4.cs index 1e12e66..b32b727 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink4.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink4.cs @@ -157,17 +157,17 @@ public unsafe partial struct ID2D1CommandSink4 : ID2D1CommandSink4.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - public HResult DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public HResult DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] - public HResult DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public HResult DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink4*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink4*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -197,17 +197,17 @@ public unsafe partial struct ID2D1CommandSink4 : ID2D1CommandSink4.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(18)] - public HResult DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public HResult DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink4*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink4*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(19)] - public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink4*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink4*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink5.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink5.cs index 7d2cd3b..a11717d 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink5.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1CommandSink5.cs @@ -157,17 +157,17 @@ public unsafe partial struct ID2D1CommandSink5 : ID2D1CommandSink5.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - public HResult DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public HResult DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(14)] - public HResult DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public HResult DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -197,17 +197,17 @@ public unsafe partial struct ID2D1CommandSink5 : ID2D1CommandSink5.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(18)] - public HResult DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public HResult DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(19)] - public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public HResult DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// @@ -325,15 +325,15 @@ public unsafe partial struct ID2D1CommandSink5 : ID2D1CommandSink5.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(34)] - public HResult BlendImage(ID2D1Image* image, Common.BlendMode blendMode, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode) + public HResult BlendImage(ID2D1Image* image, Common.BlendMode blendMode, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), image, blendMode, targetOffset, imageRectangle, interpolationMode); + return ((delegate* unmanaged[Stdcall])(lpVtbl[34]))((ID2D1CommandSink5*)Unsafe.AsPointer(ref this), image, blendMode, targetOffset, imageRectangle, interpolationMode); } public interface Interface : ID2D1CommandSink4.Interface { [VtblIndex(34)] - HResult BlendImage(ID2D1Image* image, Common.BlendMode blendMode, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode); + HResult BlendImage(ID2D1Image* image, Common.BlendMode blendMode, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode); } } diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DCRenderTarget.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DCRenderTarget.cs index 028e2cc..ea4f268 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DCRenderTarget.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DCRenderTarget.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1DCRenderTarget : ID2D1DCRenderTarget.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1DCRenderTarget : ID2D1DCRenderTarget.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DCRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext.cs index fb60d23..502a7a3 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1DeviceContext : ID2D1DeviceContext.Interface, /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1DeviceContext : ID2D1DeviceContext.Interface, /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// @@ -632,9 +632,9 @@ public unsafe partial struct ID2D1DeviceContext : ID2D1DeviceContext.Interface, /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(72)] - public HResult GetGlyphRunWorldBounds(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) + public HResult GetGlyphRunWorldBounds(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); + return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); } /// @@ -712,25 +712,25 @@ public unsafe partial struct ID2D1DeviceContext : ID2D1DeviceContext.Interface, /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(82)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(83)] - public void DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public void DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(84)] - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// @@ -837,7 +837,7 @@ public unsafe partial struct ID2D1DeviceContext : ID2D1DeviceContext.Interface, HResult GetImageWorldBounds(ID2D1Image* image, Common.RectF* worldBounds); [VtblIndex(72)] - HResult GetGlyphRunWorldBounds(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds); + HResult GetGlyphRunWorldBounds(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds); [VtblIndex(73)] void GetDevice(ID2D1Device** device); @@ -867,13 +867,13 @@ public unsafe partial struct ID2D1DeviceContext : ID2D1DeviceContext.Interface, UnitMode GetUnitMode(); [VtblIndex(82)] - void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode); + void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode); [VtblIndex(83)] - void DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode); + void DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode); [VtblIndex(84)] - void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset); + void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset); [VtblIndex(85)] void DrawBitmap(ID2D1Bitmap* bitmap, Common.RectF* destinationRectangle, float opacity, InterpolationMode interpolationMode, Common.RectF* sourceRectangle, Matrix4x4* perspectiveTransform); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext1.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext1.cs index 81f94fe..8bac572 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext1.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext1.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1DeviceContext1 : ID2D1DeviceContext1.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1DeviceContext1 : ID2D1DeviceContext1.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// @@ -632,9 +632,9 @@ public unsafe partial struct ID2D1DeviceContext1 : ID2D1DeviceContext1.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(72)] - public HResult GetGlyphRunWorldBounds(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) + public HResult GetGlyphRunWorldBounds(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); + return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); } /// @@ -712,25 +712,25 @@ public unsafe partial struct ID2D1DeviceContext1 : ID2D1DeviceContext1.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(82)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(83)] - public void DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public void DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(84)] - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext1*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext2.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext2.cs index 22bfb80..4e98450 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext2.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext2.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1DeviceContext2 : ID2D1DeviceContext2.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1DeviceContext2 : ID2D1DeviceContext2.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// @@ -632,9 +632,9 @@ public unsafe partial struct ID2D1DeviceContext2 : ID2D1DeviceContext2.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(72)] - public HResult GetGlyphRunWorldBounds(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) + public HResult GetGlyphRunWorldBounds(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); + return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); } /// @@ -712,25 +712,25 @@ public unsafe partial struct ID2D1DeviceContext2 : ID2D1DeviceContext2.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(82)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(83)] - public void DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public void DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(84)] - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext2*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext3.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext3.cs index 6172f54..c9c7a8c 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext3.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext3.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1DeviceContext3 : ID2D1DeviceContext3.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1DeviceContext3 : ID2D1DeviceContext3.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// @@ -632,9 +632,9 @@ public unsafe partial struct ID2D1DeviceContext3 : ID2D1DeviceContext3.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(72)] - public HResult GetGlyphRunWorldBounds(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) + public HResult GetGlyphRunWorldBounds(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); + return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); } /// @@ -712,25 +712,25 @@ public unsafe partial struct ID2D1DeviceContext3 : ID2D1DeviceContext3.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(82)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(83)] - public void DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public void DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(84)] - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext3*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext4.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext4.cs index 50fefb4..ccdf51a 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext4.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext4.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1DeviceContext4 : ID2D1DeviceContext4.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1DeviceContext4 : ID2D1DeviceContext4.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// @@ -632,9 +632,9 @@ public unsafe partial struct ID2D1DeviceContext4 : ID2D1DeviceContext4.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(72)] - public HResult GetGlyphRunWorldBounds(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) + public HResult GetGlyphRunWorldBounds(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); + return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); } /// @@ -712,25 +712,25 @@ public unsafe partial struct ID2D1DeviceContext4 : ID2D1DeviceContext4.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(82)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(83)] - public void DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public void DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(84)] - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// @@ -936,41 +936,41 @@ public unsafe partial struct ID2D1DeviceContext4 : ID2D1DeviceContext4.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(110)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[110]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[110]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(111)] - public void DrawColorBitmapGlyphRun(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, ColorBitmapGlyphSnapOption bitmapSnapOption) + public void DrawColorBitmapGlyphRun(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, ColorBitmapGlyphSnapOption bitmapSnapOption) { - ((delegate* unmanaged[Stdcall])(lpVtbl[111]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), glyphImageFormat, baselineOrigin, glyphRun, measuringMode, bitmapSnapOption); + ((delegate* unmanaged[Stdcall])(lpVtbl[111]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), glyphImageFormat, baselineOrigin, glyphRun, measuringMode, bitmapSnapOption); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(112)] - public void DrawSvgGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawSvgGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[112]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[112]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(113)] - public HResult GetColorBitmapGlyphImage(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, System.Drawing.PointF glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, float dpiX, float dpiY, Matrix3x2* glyphTransform, ID2D1Image** glyphImage) + public HResult GetColorBitmapGlyphImage(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, Vector2 glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, float dpiX, float dpiY, Matrix3x2* glyphTransform, ID2D1Image** glyphImage) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[113]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), glyphImageFormat, glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, dpiX, dpiY, glyphTransform, glyphImage); + return ((delegate* unmanaged[Stdcall])(lpVtbl[113]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), glyphImageFormat, glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, dpiX, dpiY, glyphTransform, glyphImage); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(114)] - public HResult GetSvgGlyphImage(System.Drawing.PointF glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Matrix3x2* glyphTransform, ID2D1CommandList** glyphImage) + public HResult GetSvgGlyphImage(Vector2 glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Matrix3x2* glyphTransform, ID2D1CommandList** glyphImage) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[114]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, glyphTransform, glyphImage); + return ((delegate* unmanaged[Stdcall])(lpVtbl[114]))((ID2D1DeviceContext4*)Unsafe.AsPointer(ref this), glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, glyphTransform, glyphImage); } public interface Interface : ID2D1DeviceContext3.Interface @@ -982,19 +982,19 @@ public unsafe partial struct ID2D1DeviceContext4 : ID2D1DeviceContext4.Interface void DrawText(ushort* @string, uint stringLength, Graphics.DirectWrite.IDWriteTextFormat* textFormat, Common.RectF* layoutRect, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options, Graphics.DirectWrite.MeasuringMode measuringMode); [VtblIndex(110)] - void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options); + void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options); [VtblIndex(111)] - void DrawColorBitmapGlyphRun(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, ColorBitmapGlyphSnapOption bitmapSnapOption); + void DrawColorBitmapGlyphRun(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, ColorBitmapGlyphSnapOption bitmapSnapOption); [VtblIndex(112)] - void DrawSvgGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Graphics.DirectWrite.MeasuringMode measuringMode); + void DrawSvgGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Graphics.DirectWrite.MeasuringMode measuringMode); [VtblIndex(113)] - HResult GetColorBitmapGlyphImage(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, System.Drawing.PointF glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, float dpiX, float dpiY, Matrix3x2* glyphTransform, ID2D1Image** glyphImage); + HResult GetColorBitmapGlyphImage(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, Vector2 glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, float dpiX, float dpiY, Matrix3x2* glyphTransform, ID2D1Image** glyphImage); [VtblIndex(114)] - HResult GetSvgGlyphImage(System.Drawing.PointF glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Matrix3x2* glyphTransform, ID2D1CommandList** glyphImage); + HResult GetSvgGlyphImage(Vector2 glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Matrix3x2* glyphTransform, ID2D1CommandList** glyphImage); } } diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext5.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext5.cs index a3c9d28..d6bd66a 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext5.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext5.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1DeviceContext5 : ID2D1DeviceContext5.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1DeviceContext5 : ID2D1DeviceContext5.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// @@ -632,9 +632,9 @@ public unsafe partial struct ID2D1DeviceContext5 : ID2D1DeviceContext5.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(72)] - public HResult GetGlyphRunWorldBounds(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) + public HResult GetGlyphRunWorldBounds(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); + return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); } /// @@ -712,25 +712,25 @@ public unsafe partial struct ID2D1DeviceContext5 : ID2D1DeviceContext5.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(82)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(83)] - public void DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public void DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(84)] - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// @@ -936,41 +936,41 @@ public unsafe partial struct ID2D1DeviceContext5 : ID2D1DeviceContext5.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(110)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[110]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[110]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(111)] - public void DrawColorBitmapGlyphRun(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, ColorBitmapGlyphSnapOption bitmapSnapOption) + public void DrawColorBitmapGlyphRun(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, ColorBitmapGlyphSnapOption bitmapSnapOption) { - ((delegate* unmanaged[Stdcall])(lpVtbl[111]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), glyphImageFormat, baselineOrigin, glyphRun, measuringMode, bitmapSnapOption); + ((delegate* unmanaged[Stdcall])(lpVtbl[111]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), glyphImageFormat, baselineOrigin, glyphRun, measuringMode, bitmapSnapOption); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(112)] - public void DrawSvgGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawSvgGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[112]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[112]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(113)] - public HResult GetColorBitmapGlyphImage(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, System.Drawing.PointF glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, float dpiX, float dpiY, Matrix3x2* glyphTransform, ID2D1Image** glyphImage) + public HResult GetColorBitmapGlyphImage(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, Vector2 glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, float dpiX, float dpiY, Matrix3x2* glyphTransform, ID2D1Image** glyphImage) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[113]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), glyphImageFormat, glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, dpiX, dpiY, glyphTransform, glyphImage); + return ((delegate* unmanaged[Stdcall])(lpVtbl[113]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), glyphImageFormat, glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, dpiX, dpiY, glyphTransform, glyphImage); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(114)] - public HResult GetSvgGlyphImage(System.Drawing.PointF glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Matrix3x2* glyphTransform, ID2D1CommandList** glyphImage) + public HResult GetSvgGlyphImage(Vector2 glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Matrix3x2* glyphTransform, ID2D1CommandList** glyphImage) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[114]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, glyphTransform, glyphImage); + return ((delegate* unmanaged[Stdcall])(lpVtbl[114]))((ID2D1DeviceContext5*)Unsafe.AsPointer(ref this), glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, glyphTransform, glyphImage); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext6.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext6.cs index 837acc2..5df5aca 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext6.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1DeviceContext6.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1DeviceContext6 : ID2D1DeviceContext6.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1DeviceContext6 : ID2D1DeviceContext6.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// @@ -632,9 +632,9 @@ public unsafe partial struct ID2D1DeviceContext6 : ID2D1DeviceContext6.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(72)] - public HResult GetGlyphRunWorldBounds(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) + public HResult GetGlyphRunWorldBounds(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, Common.RectF* bounds) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); + return ((delegate* unmanaged[Stdcall])(lpVtbl[72]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, measuringMode, bounds); } /// @@ -712,25 +712,25 @@ public unsafe partial struct ID2D1DeviceContext6 : ID2D1DeviceContext6.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(82)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.GlyphRunDescription* glyphRunDescription, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[82]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, foregroundBrush, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(83)] - public void DrawImage(ID2D1Image* image, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) + public void DrawImage(ID2D1Image* image, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode, Common.CompositeMode compositeMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[83]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), image, targetOffset, imageRectangle, interpolationMode, compositeMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(84)] - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, System.Drawing.PointF* targetOffset) + public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2* targetOffset) { - ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); + ((delegate* unmanaged[Stdcall])(lpVtbl[84]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), gdiMetafile, targetOffset); } /// @@ -936,41 +936,41 @@ public unsafe partial struct ID2D1DeviceContext6 : ID2D1DeviceContext6.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(110)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[110]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[110]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(111)] - public void DrawColorBitmapGlyphRun(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, ColorBitmapGlyphSnapOption bitmapSnapOption) + public void DrawColorBitmapGlyphRun(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, Graphics.DirectWrite.MeasuringMode measuringMode, ColorBitmapGlyphSnapOption bitmapSnapOption) { - ((delegate* unmanaged[Stdcall])(lpVtbl[111]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), glyphImageFormat, baselineOrigin, glyphRun, measuringMode, bitmapSnapOption); + ((delegate* unmanaged[Stdcall])(lpVtbl[111]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), glyphImageFormat, baselineOrigin, glyphRun, measuringMode, bitmapSnapOption); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(112)] - public void DrawSvgGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawSvgGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[112]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[112]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, measuringMode); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(113)] - public HResult GetColorBitmapGlyphImage(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, System.Drawing.PointF glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, float dpiX, float dpiY, Matrix3x2* glyphTransform, ID2D1Image** glyphImage) + public HResult GetColorBitmapGlyphImage(Graphics.DirectWrite.GlyphImageFormats glyphImageFormat, Vector2 glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, float dpiX, float dpiY, Matrix3x2* glyphTransform, ID2D1Image** glyphImage) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[113]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), glyphImageFormat, glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, dpiX, dpiY, glyphTransform, glyphImage); + return ((delegate* unmanaged[Stdcall])(lpVtbl[113]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), glyphImageFormat, glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, dpiX, dpiY, glyphTransform, glyphImage); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(114)] - public HResult GetSvgGlyphImage(System.Drawing.PointF glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Matrix3x2* glyphTransform, ID2D1CommandList** glyphImage) + public HResult GetSvgGlyphImage(Vector2 glyphOrigin, Graphics.DirectWrite.IDWriteFontFace* fontFace, float fontEmSize, ushort glyphIndex, Bool32 isSideways, Matrix3x2* worldTransform, ID2D1Brush* defaultFillBrush, ID2D1SvgGlyphStyle* svgGlyphStyle, uint colorPaletteIndex, Matrix3x2* glyphTransform, ID2D1CommandList** glyphImage) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[114]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, glyphTransform, glyphImage); + return ((delegate* unmanaged[Stdcall])(lpVtbl[114]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), glyphOrigin, fontFace, fontEmSize, glyphIndex, isSideways, worldTransform, defaultFillBrush, svgGlyphStyle, colorPaletteIndex, glyphTransform, glyphImage); } /// @@ -1008,15 +1008,15 @@ public unsafe partial struct ID2D1DeviceContext6 : ID2D1DeviceContext6.Interface /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(119)] - public void BlendImage(ID2D1Image* image, Common.BlendMode blendMode, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode) + public void BlendImage(ID2D1Image* image, Common.BlendMode blendMode, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[119]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), image, blendMode, targetOffset, imageRectangle, interpolationMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[119]))((ID2D1DeviceContext6*)Unsafe.AsPointer(ref this), image, blendMode, targetOffset, imageRectangle, interpolationMode); } public interface Interface : ID2D1DeviceContext5.Interface { [VtblIndex(119)] - void BlendImage(ID2D1Image* image, Common.BlendMode blendMode, System.Drawing.PointF* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode); + void BlendImage(ID2D1Image* image, Common.BlendMode blendMode, Vector2* targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode); } } diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1EllipseGeometry.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1EllipseGeometry.cs index 1228b66..274bc92 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1EllipseGeometry.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1EllipseGeometry.cs @@ -101,17 +101,17 @@ public unsafe partial struct ID2D1EllipseGeometry : ID2D1EllipseGeometry.Interfa /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); } /// @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1EllipseGeometry : ID2D1EllipseGeometry.Interfa /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector) + public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1EllipseGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1Geometry.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1Geometry.cs index 0a8d625..c8bd0bc 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1Geometry.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1Geometry.cs @@ -101,17 +101,17 @@ public unsafe partial struct ID2D1Geometry : ID2D1Geometry.Interface, INativeGui /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); } /// @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1Geometry : ID2D1Geometry.Interface, INativeGui /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector) + public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1Geometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); } /// @@ -195,10 +195,10 @@ public unsafe partial struct ID2D1Geometry : ID2D1Geometry.Interface, INativeGui HResult GetWidenedBounds(float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Common.RectF* bounds); [VtblIndex(6)] - HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains); + HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains); [VtblIndex(7)] - HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains); + HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains); [VtblIndex(8)] HResult CompareWithGeometry(ID2D1Geometry* inputGeometry, Matrix3x2* inputGeometryTransform, float flatteningTolerance, GeometryRelation* relation); @@ -222,7 +222,7 @@ public unsafe partial struct ID2D1Geometry : ID2D1Geometry.Interface, INativeGui HResult ComputeLength(Matrix3x2* worldTransform, float flatteningTolerance, float* length); [VtblIndex(15)] - HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector); + HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector); [VtblIndex(16)] HResult Widen(float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Common.ID2D1SimplifiedGeometrySink* geometrySink); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1GeometryGroup.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1GeometryGroup.cs index 9290cca..964eba6 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1GeometryGroup.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1GeometryGroup.cs @@ -101,17 +101,17 @@ public unsafe partial struct ID2D1GeometryGroup : ID2D1GeometryGroup.Interface, /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); } /// @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1GeometryGroup : ID2D1GeometryGroup.Interface, /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector) + public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1GeometryGroup*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1GeometrySink.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1GeometrySink.cs index 0679b00..7c894a0 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1GeometrySink.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1GeometrySink.cs @@ -95,17 +95,17 @@ public unsafe partial struct ID2D1GeometrySink : ID2D1GeometrySink.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(5)] - public void BeginFigure(System.Drawing.PointF startPoint, Common.FigureBegin figureBegin) + public void BeginFigure(Vector2 startPoint, Common.FigureBegin figureBegin) { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), startPoint, figureBegin); + ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), startPoint, figureBegin); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public void AddLines(System.Drawing.PointF* points, uint pointsCount) + public void AddLines(Vector2* points, uint pointsCount) { - ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), points, pointsCount); + ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), points, pointsCount); } /// @@ -135,9 +135,9 @@ public unsafe partial struct ID2D1GeometrySink : ID2D1GeometrySink.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(10)] - public void AddLine(System.Drawing.PointF point) + public void AddLine(Vector2 point) { - ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), point); + ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1GeometrySink*)Unsafe.AsPointer(ref this), point); } /// @@ -175,7 +175,7 @@ public unsafe partial struct ID2D1GeometrySink : ID2D1GeometrySink.Interface, IN public interface Interface : ID2D1SimplifiedGeometrySink.Interface { [VtblIndex(10)] - void AddLine(System.Drawing.PointF point); + void AddLine(Vector2 point); [VtblIndex(11)] void AddBezier(Common.BezierSegment* bezier); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1HwndRenderTarget.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1HwndRenderTarget.cs index cc877cd..d4a3a82 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1HwndRenderTarget.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1HwndRenderTarget.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1HwndRenderTarget : ID2D1HwndRenderTarget.Inter /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1HwndRenderTarget : ID2D1HwndRenderTarget.Inter /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1HwndRenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1LinearGradientBrush.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1LinearGradientBrush.cs index 9ea9190..9dee0a4 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1LinearGradientBrush.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1LinearGradientBrush.cs @@ -117,35 +117,35 @@ public unsafe partial struct ID2D1LinearGradientBrush : ID2D1LinearGradientBrush /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(8)] - public void SetStartPoint(System.Drawing.PointF startPoint) + public void SetStartPoint(Vector2 startPoint) { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), startPoint); + ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), startPoint); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(9)] - public void SetEndPoint(System.Drawing.PointF endPoint) + public void SetEndPoint(Vector2 endPoint) { - ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), endPoint); + ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), endPoint); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(10)] - public System.Drawing.PointF GetStartPoint() + public Vector2 GetStartPoint() { - System.Drawing.PointF result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), &result); + Vector2 result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[10]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), &result); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(11)] - public System.Drawing.PointF GetEndPoint() + public Vector2 GetEndPoint() { - System.Drawing.PointF result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), &result); + Vector2 result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[11]))((ID2D1LinearGradientBrush*)Unsafe.AsPointer(ref this), &result); } /// @@ -159,16 +159,16 @@ public unsafe partial struct ID2D1LinearGradientBrush : ID2D1LinearGradientBrush public interface Interface : ID2D1Brush.Interface { [VtblIndex(8)] - void SetStartPoint(System.Drawing.PointF startPoint); + void SetStartPoint(Vector2 startPoint); [VtblIndex(9)] - void SetEndPoint(System.Drawing.PointF endPoint); + void SetEndPoint(Vector2 endPoint); [VtblIndex(10)] - System.Drawing.PointF GetStartPoint(); + Vector2 GetStartPoint(); [VtblIndex(11)] - System.Drawing.PointF GetEndPoint(); + Vector2 GetEndPoint(); [VtblIndex(12)] void GetGradientStopCollection(ID2D1GradientStopCollection** gradientStopCollection); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1PathGeometry.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1PathGeometry.cs index f08c2e5..cb2e533 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1PathGeometry.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1PathGeometry.cs @@ -101,17 +101,17 @@ public unsafe partial struct ID2D1PathGeometry : ID2D1PathGeometry.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); } /// @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1PathGeometry : ID2D1PathGeometry.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector) + public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1PathGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1PathGeometry1.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1PathGeometry1.cs index 4612ce3..5045134 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1PathGeometry1.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1PathGeometry1.cs @@ -101,17 +101,17 @@ public unsafe partial struct ID2D1PathGeometry1 : ID2D1PathGeometry1.Interface, /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1PathGeometry1*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1PathGeometry1*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1PathGeometry1*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1PathGeometry1*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); } /// @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1PathGeometry1 : ID2D1PathGeometry1.Interface, /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector) + public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1PathGeometry1*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1PathGeometry1*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RadialGradientBrush.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RadialGradientBrush.cs index 071ad48..a73866c 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RadialGradientBrush.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RadialGradientBrush.cs @@ -117,17 +117,17 @@ public unsafe partial struct ID2D1RadialGradientBrush : ID2D1RadialGradientBrush /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(8)] - public void SetCenter(System.Drawing.PointF center) + public void SetCenter(Vector2 center) { - ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), center); + ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), center); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(9)] - public void SetGradientOriginOffset(System.Drawing.PointF gradientOriginOffset) + public void SetGradientOriginOffset(Vector2 gradientOriginOffset) { - ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), gradientOriginOffset); + ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), gradientOriginOffset); } /// @@ -149,19 +149,19 @@ public unsafe partial struct ID2D1RadialGradientBrush : ID2D1RadialGradientBrush /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(12)] - public System.Drawing.PointF GetCenter() + public Vector2 GetCenter() { - System.Drawing.PointF result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), &result); + Vector2 result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[12]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), &result); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - public System.Drawing.PointF GetGradientOriginOffset() + public Vector2 GetGradientOriginOffset() { - System.Drawing.PointF result; - return *((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), &result); + Vector2 result; + return *((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1RadialGradientBrush*)Unsafe.AsPointer(ref this), &result); } /// @@ -191,10 +191,10 @@ public unsafe partial struct ID2D1RadialGradientBrush : ID2D1RadialGradientBrush public interface Interface : ID2D1Brush.Interface { [VtblIndex(8)] - void SetCenter(System.Drawing.PointF center); + void SetCenter(Vector2 center); [VtblIndex(9)] - void SetGradientOriginOffset(System.Drawing.PointF gradientOriginOffset); + void SetGradientOriginOffset(Vector2 gradientOriginOffset); [VtblIndex(10)] void SetRadiusX(float radiusX); @@ -203,10 +203,10 @@ public unsafe partial struct ID2D1RadialGradientBrush : ID2D1RadialGradientBrush void SetRadiusY(float radiusY); [VtblIndex(12)] - System.Drawing.PointF GetCenter(); + Vector2 GetCenter(); [VtblIndex(13)] - System.Drawing.PointF GetGradientOriginOffset(); + Vector2 GetGradientOriginOffset(); [VtblIndex(14)] float GetRadiusX(); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RectangleGeometry.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RectangleGeometry.cs index 7f91273..c1314c5 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RectangleGeometry.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RectangleGeometry.cs @@ -101,17 +101,17 @@ public unsafe partial struct ID2D1RectangleGeometry : ID2D1RectangleGeometry.Int /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); } /// @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1RectangleGeometry : ID2D1RectangleGeometry.Int /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector) + public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RectangleGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RenderTarget.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RenderTarget.cs index 0747f73..3c83388 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RenderTarget.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RenderTarget.cs @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1RenderTarget : ID2D1RenderTarget.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) + public void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle) { - ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), point0, point1, brush, strokeWidth, strokeStyle); } /// @@ -277,17 +277,17 @@ public unsafe partial struct ID2D1RenderTarget : ID2D1RenderTarget.Interface, IN /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(28)] - public void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) + public void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options) { - ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); + ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), origin, textLayout, defaultFillBrush, options); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(29)] - public void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) + public void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode) { - ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); + ((delegate* unmanaged[Stdcall])(lpVtbl[29]))((ID2D1RenderTarget*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, foregroundBrush, measuringMode); } /// @@ -545,7 +545,7 @@ public unsafe partial struct ID2D1RenderTarget : ID2D1RenderTarget.Interface, IN HResult CreateMesh(ID2D1Mesh** mesh); [VtblIndex(15)] - void DrawLine(System.Drawing.PointF point0, System.Drawing.PointF point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); + void DrawLine(Vector2 point0, Vector2 point1, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); [VtblIndex(16)] void DrawRectangle(Common.RectF* rect, ID2D1Brush* brush, float strokeWidth, ID2D1StrokeStyle* strokeStyle); @@ -584,10 +584,10 @@ public unsafe partial struct ID2D1RenderTarget : ID2D1RenderTarget.Interface, IN void DrawText(ushort* @string, uint stringLength, Graphics.DirectWrite.IDWriteTextFormat* textFormat, Common.RectF* layoutRect, ID2D1Brush* defaultFillBrush, DrawTextOptions options, Graphics.DirectWrite.MeasuringMode measuringMode); [VtblIndex(28)] - void DrawTextLayout(System.Drawing.PointF origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options); + void DrawTextLayout(Vector2 origin, Graphics.DirectWrite.IDWriteTextLayout* textLayout, ID2D1Brush* defaultFillBrush, DrawTextOptions options); [VtblIndex(29)] - void DrawGlyphRun(System.Drawing.PointF baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode); + void DrawGlyphRun(Vector2 baselineOrigin, Graphics.DirectWrite.GlyphRun* glyphRun, ID2D1Brush* foregroundBrush, Graphics.DirectWrite.MeasuringMode measuringMode); [VtblIndex(30)] void SetTransform(Matrix3x2* transform); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RoundedRectangleGeometry.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RoundedRectangleGeometry.cs index 58002a5..02b9686 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RoundedRectangleGeometry.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1RoundedRectangleGeometry.cs @@ -101,17 +101,17 @@ public unsafe partial struct ID2D1RoundedRectangleGeometry : ID2D1RoundedRectang /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); } /// @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1RoundedRectangleGeometry : ID2D1RoundedRectang /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector) + public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1RoundedRectangleGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1SvgDocument.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1SvgDocument.cs index 533d245..0431da6 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1SvgDocument.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1SvgDocument.cs @@ -158,9 +158,9 @@ public unsafe partial struct ID2D1SvgDocument : ID2D1SvgDocument.Interface, INat /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(13)] - public HResult CreatePointCollection(System.Drawing.PointF* points, uint pointsCount, ID2D1SvgPointCollection** pointCollection) + public HResult CreatePointCollection(Vector2* points, uint pointsCount, ID2D1SvgPointCollection** pointCollection) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1SvgDocument*)Unsafe.AsPointer(ref this), points, pointsCount, pointCollection); + return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((ID2D1SvgDocument*)Unsafe.AsPointer(ref this), points, pointsCount, pointCollection); } /// @@ -201,7 +201,7 @@ public unsafe partial struct ID2D1SvgDocument : ID2D1SvgDocument.Interface, INat HResult CreateStrokeDashArray(SvgLength* dashes, uint dashesCount, ID2D1SvgStrokeDashArray** strokeDashArray); [VtblIndex(13)] - HResult CreatePointCollection(System.Drawing.PointF* points, uint pointsCount, ID2D1SvgPointCollection** pointCollection); + HResult CreatePointCollection(Vector2* points, uint pointsCount, ID2D1SvgPointCollection** pointCollection); [VtblIndex(14)] HResult CreatePathData(float* segmentData, uint segmentDataCount, SvgPathCommand* commands, uint commandsCount, ID2D1SvgPathData** pathData); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1SvgPointCollection.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1SvgPointCollection.cs index c78c5cc..9fdc30b 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1SvgPointCollection.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1SvgPointCollection.cs @@ -109,17 +109,17 @@ public unsafe partial struct ID2D1SvgPointCollection : ID2D1SvgPointCollection.I /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult UpdatePoints(System.Drawing.PointF* points, uint pointsCount, uint startIndex) + public HResult UpdatePoints(Vector2* points, uint pointsCount, uint startIndex) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1SvgPointCollection*)Unsafe.AsPointer(ref this), points, pointsCount, startIndex); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1SvgPointCollection*)Unsafe.AsPointer(ref this), points, pointsCount, startIndex); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(8)] - public HResult GetPoints(System.Drawing.PointF* points, uint pointsCount, uint startIndex) + public HResult GetPoints(Vector2* points, uint pointsCount, uint startIndex) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1SvgPointCollection*)Unsafe.AsPointer(ref this), points, pointsCount, startIndex); + return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((ID2D1SvgPointCollection*)Unsafe.AsPointer(ref this), points, pointsCount, startIndex); } /// @@ -136,10 +136,10 @@ public unsafe partial struct ID2D1SvgPointCollection : ID2D1SvgPointCollection.I HResult RemovePointsAtEnd(uint pointsCount); [VtblIndex(7)] - HResult UpdatePoints(System.Drawing.PointF* points, uint pointsCount, uint startIndex); + HResult UpdatePoints(Vector2* points, uint pointsCount, uint startIndex); [VtblIndex(8)] - HResult GetPoints(System.Drawing.PointF* points, uint pointsCount, uint startIndex); + HResult GetPoints(Vector2* points, uint pointsCount, uint startIndex); [VtblIndex(9)] uint GetPointsCount(); diff --git a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1TransformedGeometry.cs b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1TransformedGeometry.cs index 2e812a0..1cc2a15 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1TransformedGeometry.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/Generated/ID2D1TransformedGeometry.cs @@ -101,17 +101,17 @@ public unsafe partial struct ID2D1TransformedGeometry : ID2D1TransformedGeometry /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public HResult StrokeContainsPoint(System.Drawing.PointF point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult StrokeContainsPoint(Vector2 point, float strokeWidth, ID2D1StrokeStyle* strokeStyle, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), point, strokeWidth, strokeStyle, worldTransform, flatteningTolerance, contains); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(7)] - public HResult FillContainsPoint(System.Drawing.PointF point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) + public HResult FillContainsPoint(Vector2 point, Matrix3x2* worldTransform, float flatteningTolerance, Bool32* contains) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), point, worldTransform, flatteningTolerance, contains); } /// @@ -173,9 +173,9 @@ public unsafe partial struct ID2D1TransformedGeometry : ID2D1TransformedGeometry /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(15)] - public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, System.Drawing.PointF* point, System.Drawing.PointF* unitTangentVector) + public HResult ComputePointAtLength(float length, Matrix3x2* worldTransform, float flatteningTolerance, Vector2* point, Vector2* unitTangentVector) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1TransformedGeometry*)Unsafe.AsPointer(ref this), length, worldTransform, flatteningTolerance, point, unitTangentVector); } /// diff --git a/src/Vortice.Win32.Graphics.Direct2D/GradientStop.cs b/src/Vortice.Win32.Graphics.Direct2D/GradientStop.cs new file mode 100644 index 0000000..1e13e31 --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/GradientStop.cs @@ -0,0 +1,13 @@ +// 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 partial struct GradientStop +{ + public GradientStop(float position, in Color4 color) + { + this.position = position; + this.color = color; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/HwndRenderTargetProperties.cs b/src/Vortice.Win32.Graphics.Direct2D/HwndRenderTargetProperties.cs new file mode 100644 index 0000000..241799d --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/HwndRenderTargetProperties.cs @@ -0,0 +1,19 @@ +// 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.Direct2D; + +public partial struct HwndRenderTargetProperties +{ + public HwndRenderTargetProperties( + IntPtr hwnd, + Size pixelSize = default, + PresentOptions presentOptions = PresentOptions.None) + { + this.hwnd = hwnd; + this.pixelSize = pixelSize; + this.presentOptions = presentOptions; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/ID2D1DeviceContext.cs b/src/Vortice.Win32.Graphics.Direct2D/ID2D1DeviceContext.cs index f4b5eae..ee013bb 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/ID2D1DeviceContext.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/ID2D1DeviceContext.cs @@ -2,10 +2,10 @@ // Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. using System.Drawing; -using static Win32.Apis; using Win32.Graphics.Direct2D.Common; using Win32.Graphics.Imaging; -using Win32.Numerics; +using static Win32.Apis; +using static Win32.Graphics.Direct2D.Apis; namespace Win32.Graphics.Direct2D; @@ -114,7 +114,7 @@ public unsafe partial struct ID2D1DeviceContext public void DrawImage( ID2D1Effect* effect, - PointF* targetOffset = null, + Vector2* targetOffset = null, Common.RectF* imageRectangle = null, InterpolationMode interpolationMode = InterpolationMode.Linear, CompositeMode compositeMode = CompositeMode.SourceOver) @@ -142,7 +142,7 @@ public unsafe partial struct ID2D1DeviceContext } public void DrawImage(ID2D1Image* image, - PointF targetOffset, + Vector2 targetOffset, InterpolationMode interpolationMode = InterpolationMode.Linear, CompositeMode compositeMode = CompositeMode.SourceOver) { @@ -150,7 +150,7 @@ public unsafe partial struct ID2D1DeviceContext } public void DrawImage(ID2D1Effect* effect, - PointF targetOffset, + Vector2 targetOffset, InterpolationMode interpolationMode = InterpolationMode.Linear, CompositeMode compositeMode = CompositeMode.SourceOver) { @@ -158,7 +158,7 @@ public unsafe partial struct ID2D1DeviceContext } public void DrawImage(ID2D1Image* image, - PointF targetOffset, + Vector2 targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode = InterpolationMode.Linear, CompositeMode compositeMode = CompositeMode.SourceOver) @@ -167,7 +167,7 @@ public unsafe partial struct ID2D1DeviceContext } public void DrawImage(ID2D1Effect* effect, - PointF targetOffset, + Vector2 targetOffset, Common.RectF* imageRectangle, InterpolationMode interpolationMode = InterpolationMode.Linear, CompositeMode compositeMode = CompositeMode.SourceOver) @@ -175,8 +175,66 @@ public unsafe partial struct ID2D1DeviceContext DrawImage(effect, &targetOffset, imageRectangle, interpolationMode, compositeMode); } - public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, PointF targetOffset) + public void DrawGdiMetafile(ID2D1GdiMetafile* gdiMetafile, Vector2 targetOffset) { DrawGdiMetafile(gdiMetafile, &targetOffset); } } + +public static unsafe partial class ID2D1DeviceContextExtensions +{ + public static HResult SetDpiCompensatedEffectInput( + ref this TD2D1DeviceContext self, + ID2D1Effect* effect, + uint inputIndex, + ID2D1Bitmap* inputBitmap, + InterpolationMode interpolationMode = InterpolationMode.Linear, + BorderMode borderMode = BorderMode.Hard) + where TD2D1DeviceContext : unmanaged, ID2D1DeviceContext.Interface + { + HResult hr = HResult.Ok; + ID2D1Effect* dpiCompensationEffect = null; + + if (inputBitmap == null) + { + effect->SetInput(inputIndex, null); + return hr; + } + + hr = self.CreateEffect((Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in CLSID_D2D1DpiCompensation)), &dpiCompensationEffect); + + if (hr.Success) + { + if (hr.Success) + { + dpiCompensationEffect->SetInput(0, (ID2D1Image*)inputBitmap); + + Vector2 bitmapDpi; + inputBitmap->GetDpi(&bitmapDpi.X, &bitmapDpi.Y); + hr = dpiCompensationEffect->SetValue(DpiCompensationProp.InputDpi, &bitmapDpi); + } + + if (hr.Success) + { + hr = dpiCompensationEffect->SetValue(DpiCompensationProp.InterpolationMode, &interpolationMode); + } + + if (hr.Success) + { + hr = dpiCompensationEffect->SetValue(DpiCompensationProp.BorderMode, &borderMode); + } + + if (hr.Success) + { + effect->SetInputEffect(inputIndex, dpiCompensationEffect); + } + + if (dpiCompensationEffect != null) + { + _ = dpiCompensationEffect->Release(); + } + } + + return hr; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/ID2D1Effect.cs b/src/Vortice.Win32.Graphics.Direct2D/ID2D1Effect.cs index adbb40a..9a29478 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/ID2D1Effect.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/ID2D1Effect.cs @@ -7,66 +7,6 @@ public unsafe partial struct ID2D1Effect { public uint PropertyCount => GetPropertyCount(); - public HResult SetValueByName(ReadOnlySpan name, ReadOnlySpan 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 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 name, byte* data, uint dataSize) - { - fixed (char* namePtr = name) - { - return GetValueByName((ushort*)namePtr, PropertyType.Unknown, data, dataSize); - } - } - - public HResult GetValueByName(ReadOnlySpan name, ReadOnlySpan data) - where T : unmanaged - { - fixed (char* namePtr = name) - { - fixed (T* dataPtr = data) - { - return GetValueByName((ushort*)namePtr, PropertyType.Unknown, (byte*)dataPtr, (uint)(data.Length * sizeof(T))); - } - } - } - - 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); diff --git a/src/Vortice.Win32.Graphics.Direct2D/ID2D1Properties.cs b/src/Vortice.Win32.Graphics.Direct2D/ID2D1Properties.cs index adf1c84..636b663 100644 --- a/src/Vortice.Win32.Graphics.Direct2D/ID2D1Properties.cs +++ b/src/Vortice.Win32.Graphics.Direct2D/ID2D1Properties.cs @@ -6,129 +6,160 @@ namespace Win32.Graphics.Direct2D; public unsafe partial struct ID2D1Properties { public uint PropertyCount => GetPropertyCount(); +} - public bool Cached - { - get => GetBoolValue((uint)Property.Cached); - set => SetValue((uint)Property.Cached, value); - } - - public HResult SetValueByName(ReadOnlySpan name, ReadOnlySpan data) +public static unsafe partial class ID2D1PropertiesExtensions +{ + public static HResult SetValueByName(ref this TD2D1Properties self, ReadOnlySpan name, ReadOnlySpan data) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface where T : unmanaged { fixed (char* namePtr = name) { fixed (T* dataPtr = data) { - return SetValueByName((ushort*)namePtr, PropertyType.Unknown, (byte*)dataPtr, (uint)(data.Length * sizeof(T))); + return self.SetValueByName((ushort*)namePtr, PropertyType.Unknown, (byte*)dataPtr, (uint)(data.Length * sizeof(T))); } } } - public HResult SetValueByName(ReadOnlySpan name, byte* data, uint dataSize) + public static HResult SetValueByName(ref this TD2D1Properties self, ReadOnlySpan name, byte* data, uint dataSize) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { fixed (char* namePtr = name) { - return SetValueByName((ushort*)namePtr, PropertyType.Unknown, data, dataSize); + return self.SetValueByName((ushort*)namePtr, PropertyType.Unknown, data, dataSize); } } - public HResult SetValueByName(ushort* name, byte* data, [NativeTypeName("UINT32")] uint dataSize) + public static HResult SetValueByName(ref this TD2D1Properties self, ushort* name, byte* data, uint dataSize) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { - return SetValueByName(name, PropertyType.Unknown, data, dataSize); + return self.SetValueByName(name, PropertyType.Unknown, data, dataSize); } - public HResult SetValue(uint index, byte* data, [NativeTypeName("UINT32")] uint dataSize) + public static HResult SetValue(ref this TD2D1Properties self, uint index, byte* data, int dataSize) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { - return SetValue(index, PropertyType.Unknown, data, dataSize); + return self.SetValue(index, PropertyType.Unknown, data, unchecked((uint)dataSize)); } - public HResult GetValueByName(ReadOnlySpan name, byte* data, uint dataSize) + public static HResult SetValue(ref this TD2D1Properties self, uint index, T* value) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface + where T : unmanaged + { + return self.SetValue(index, PropertyType.Unknown, (byte*)value, unchecked((uint)sizeof(T))); + } + + public static HResult SetValue(ref this TD2D1Properties self, U index, T* value) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface + where T : unmanaged + where U : unmanaged + { + return self.SetValue((uint)(object)index, PropertyType.Unknown, (byte*)value, unchecked((uint)sizeof(T))); + } + + public static HResult GetValueByName(ref this TD2D1Properties self, ReadOnlySpan name, byte* data, uint dataSize) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { fixed (char* namePtr = name) { - return GetValueByName((ushort*)namePtr, PropertyType.Unknown, data, dataSize); + return self.GetValueByName((ushort*)namePtr, PropertyType.Unknown, data, dataSize); } } - public HResult GetValueByName(ReadOnlySpan name, ReadOnlySpan data) + public static HResult GetValueByName(ref this TD2D1Properties self, ReadOnlySpan name, ReadOnlySpan data) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface where T : unmanaged { fixed (char* namePtr = name) { fixed (T* dataPtr = data) { - return GetValueByName((ushort*)namePtr, PropertyType.Unknown, (byte*)dataPtr, (uint)(data.Length * sizeof(T))); + return self.GetValueByName((ushort*)namePtr, PropertyType.Unknown, (byte*)dataPtr, (uint)(data.Length * sizeof(T))); } } } - public HResult GetValueByName(ushort* name, byte* data, uint dataSize) + public static HResult GetValueByName(ref this TD2D1Properties self, ushort* name, byte* data, uint dataSize) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { - return GetValueByName(name, PropertyType.Unknown, data, dataSize); + return self.GetValueByName(name, PropertyType.Unknown, data, dataSize); } - public HResult GetValue(uint index, byte* data, uint dataSize) + public static HResult GetValue(ref this TD2D1Properties self, uint index, byte* data, uint dataSize) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { - return GetValue(index, PropertyType.Unknown, data, dataSize); + return self.GetValue(index, PropertyType.Unknown, data, dataSize); } - public bool GetBoolValue(uint index) + public static bool GetBoolValue(ref this TD2D1Properties self, uint index) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { int value = 0; - GetValue(index, PropertyType.Bool, (byte*)&value, (uint)sizeof(Bool32)); + self.GetValue(index, PropertyType.Bool, (byte*)&value, (uint)sizeof(Bool32)); return value != 0; } - public void SetValue(uint index, Bool32 value) + public static void SetValue(ref this TD2D1Properties self, uint index, Bool32 value) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { - SetValue(index, PropertyType.Bool, (byte*)&value, (uint)sizeof(Bool32)); + self.SetValue(index, PropertyType.Bool, (byte*)&value, (uint)sizeof(Bool32)); } - public float GetFloatValue(uint index) + public static float GetFloatValue(ref this TD2D1Properties self, uint index) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { float value = 0f; - GetValue(index, PropertyType.Float, (byte*)&value, 4); + self.GetValue(index, PropertyType.Float, (byte*)&value, 4); return value; } - public void SetValue(uint index, float value) + public static void SetValue(ref this TD2D1Properties self, uint index, float value) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { - SetValue(index, PropertyType.Float, (byte*)&value, 4u); + self.SetValue(index, PropertyType.Float, (byte*)&value, 4u); } - public T GetEnumValue(uint index) where T : unmanaged, Enum + public static T GetEnumValue(ref this TD2D1Properties self, uint index) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface + where T : unmanaged, Enum { T value = default; - GetValue(index, PropertyType.Enum, (byte*)&value, 4); + self.GetValue(index, PropertyType.Enum, (byte*)&value, 4); return value; } - public void SetValue(uint index, T value) where T : unmanaged, Enum + public static void SetValue(ref this TD2D1Properties self, uint index, T value) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface + where T : unmanaged, Enum { - SetValue(index, PropertyType.Enum, (byte*)&value, 4); + self.SetValue(index, PropertyType.Enum, (byte*)&value, 4); } - public Guid GetGuidValue(uint index) + public static Guid GetGuidValue(ref this TD2D1Properties self, uint index) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { Guid value = default; - GetValue(index, PropertyType.Clsid, (byte*)&value, (uint)sizeof(Guid)); + self.GetValue(index, PropertyType.Clsid, (byte*)&value, (uint)sizeof(Guid)); return value; } - public void SetValue(uint index, Guid value) + public static void SetValue(ref this ID2D1Properties self, uint index, Guid value) + where TD2D1PropertiesExtensions : unmanaged, ID2D1Properties.Interface { - - SetValue(index, PropertyType.Clsid, (byte*)&value, (uint)sizeof(Guid)); + self.SetValue(index, PropertyType.Clsid, (byte*)&value, (uint)sizeof(Guid)); } - public void SetValue(uint index, IUnknown* value) + public static void SetValue(ref this TD2D1Properties self, uint index, IUnknown* value) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { - SetValue(index, PropertyType.IUnknown, (byte*)value, (uint)sizeof(void*)); + self.SetValue(index, PropertyType.IUnknown, (byte*)value, (uint)sizeof(void*)); } - public void SetValue(uint index, ID2D1ColorContext* value) + public static void SetValue(ref this TD2D1Properties self, uint index, ID2D1ColorContext* value) + where TD2D1Properties : unmanaged, ID2D1Properties.Interface { - SetValue(index, PropertyType.ColorContext, (byte*)value, (uint)sizeof(void*)); + self.SetValue(index, PropertyType.ColorContext, (byte*)value, (uint)sizeof(void*)); } } diff --git a/src/Vortice.Win32.Graphics.Direct2D/ImageBrushProperties.cs b/src/Vortice.Win32.Graphics.Direct2D/ImageBrushProperties.cs new file mode 100644 index 0000000..2e2f0f5 --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/ImageBrushProperties.cs @@ -0,0 +1,20 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using Win32.Graphics.Direct2D.Common; + +namespace Win32.Graphics.Direct2D; + +public partial struct ImageBrushProperties +{ + public ImageBrushProperties(in RectF sourceRectangle, + ExtendMode extendModeX = ExtendMode.Clamp, + ExtendMode extendModeY = ExtendMode.Clamp, + InterpolationMode interpolationMode = InterpolationMode.Linear) + { + this.sourceRectangle = sourceRectangle; + this.extendModeX = extendModeX; + this.extendModeY = extendModeY; + this.interpolationMode = interpolationMode; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/LinearGradientBrushProperties.cs b/src/Vortice.Win32.Graphics.Direct2D/LinearGradientBrushProperties.cs new file mode 100644 index 0000000..fed034c --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/LinearGradientBrushProperties.cs @@ -0,0 +1,13 @@ +// 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 partial struct LinearGradientBrushProperties +{ + public LinearGradientBrushProperties(in Vector2 startPoint, in Vector2 endPoint) + { + this.startPoint = startPoint; + this.endPoint = endPoint; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/RadialGradientBrushProperties.cs b/src/Vortice.Win32.Graphics.Direct2D/RadialGradientBrushProperties.cs new file mode 100644 index 0000000..d424bbb --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/RadialGradientBrushProperties.cs @@ -0,0 +1,18 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using System.Drawing; +using System.Net; + +namespace Win32.Graphics.Direct2D; + +public partial struct RadialGradientBrushProperties +{ + public RadialGradientBrushProperties(in Vector2 center, in Vector2 gradientOriginOffset, float radiusX, float radiusY) + { + this.center = center; + this.gradientOriginOffset = gradientOriginOffset; + this.radiusX = radiusX; + this.radiusY = radiusY; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct2D/RenderTargetProperties.cs b/src/Vortice.Win32.Graphics.Direct2D/RenderTargetProperties.cs new file mode 100644 index 0000000..ece4ea0 --- /dev/null +++ b/src/Vortice.Win32.Graphics.Direct2D/RenderTargetProperties.cs @@ -0,0 +1,25 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using Win32.Graphics.Direct2D.Common; + +namespace Win32.Graphics.Direct2D; + +public partial struct RenderTargetProperties +{ + public RenderTargetProperties( + RenderTargetType type = RenderTargetType.Default, + PixelFormat pixelFormat = default, + float dpiX = 0.0f, + float dpiY = 0.0f, + RenderTargetUsage usage = RenderTargetUsage.None, + FeatureLevel minLevel = FeatureLevel.Default) + { + this.type = type; + this.pixelFormat = pixelFormat; + this.dpiX = dpiX; + this.dpiY = dpiY; + this.usage = usage; + this.minLevel = minLevel; + } +} diff --git a/src/Vortice.Win32.Graphics.Direct3D11on12/Apis.cs b/src/Vortice.Win32.Graphics.Direct3D11on12/Apis.cs index 21a6903..ddf0ff8 100644 --- a/src/Vortice.Win32.Graphics.Direct3D11on12/Apis.cs +++ b/src/Vortice.Win32.Graphics.Direct3D11on12/Apis.cs @@ -1,9 +1,6 @@ // Copyright © Amer Koleci and Contributors. // Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. -using Win32.Graphics.Direct3D; -using Win32.Graphics.Dxgi; - namespace Win32.Graphics.Direct3D11on12; public static unsafe partial class Apis diff --git a/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory4.cs b/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory4.cs index a02df7d..9d278da 100644 --- a/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory4.cs +++ b/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory4.cs @@ -373,37 +373,37 @@ public unsafe partial struct IDWriteFactory4 : IDWriteFactory4.Interface, INativ /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(40)] - public HResult TranslateColorGlyphRun(System.Drawing.PointF baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers) + public HResult TranslateColorGlyphRun(Vector2 baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteFactory4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers); + return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteFactory4*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(41)] - public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, System.Drawing.PointF baselineOrigin, System.Drawing.PointF* glyphOrigins) + public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, Vector2 baselineOrigin, Vector2* glyphOrigins) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteFactory4*)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins); + return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteFactory4*)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(42)] - public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, System.Drawing.PointF baselineOrigin, Matrix3x2* worldAndDpiTransform, System.Drawing.PointF* glyphOrigins) + public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, Vector2 baselineOrigin, Matrix3x2* worldAndDpiTransform, Vector2* glyphOrigins) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteFactory4*)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins); + return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteFactory4*)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins); } public interface Interface : IDWriteFactory3.Interface { [VtblIndex(40)] - HResult TranslateColorGlyphRun(System.Drawing.PointF baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers); + HResult TranslateColorGlyphRun(Vector2 baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers); [VtblIndex(41)] - HResult ComputeGlyphOrigins(GlyphRun* glyphRun, System.Drawing.PointF baselineOrigin, System.Drawing.PointF* glyphOrigins); + HResult ComputeGlyphOrigins(GlyphRun* glyphRun, Vector2 baselineOrigin, Vector2* glyphOrigins); [VtblIndex(42)] - HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, System.Drawing.PointF baselineOrigin, Matrix3x2* worldAndDpiTransform, System.Drawing.PointF* glyphOrigins); + HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, Vector2 baselineOrigin, Matrix3x2* worldAndDpiTransform, Vector2* glyphOrigins); } } diff --git a/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory5.cs b/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory5.cs index 64457d2..fd2b810 100644 --- a/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory5.cs +++ b/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory5.cs @@ -373,25 +373,25 @@ public unsafe partial struct IDWriteFactory5 : IDWriteFactory5.Interface, INativ /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(40)] - public HResult TranslateColorGlyphRun(System.Drawing.PointF baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers) + public HResult TranslateColorGlyphRun(Vector2 baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteFactory5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers); + return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteFactory5*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(41)] - public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, System.Drawing.PointF baselineOrigin, System.Drawing.PointF* glyphOrigins) + public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, Vector2 baselineOrigin, Vector2* glyphOrigins) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteFactory5*)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins); + return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteFactory5*)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(42)] - public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, System.Drawing.PointF baselineOrigin, Matrix3x2* worldAndDpiTransform, System.Drawing.PointF* glyphOrigins) + public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, Vector2 baselineOrigin, Matrix3x2* worldAndDpiTransform, Vector2* glyphOrigins) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteFactory5*)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins); + return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteFactory5*)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins); } /// diff --git a/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory6.cs b/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory6.cs index cd9497c..524ed4f 100644 --- a/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory6.cs +++ b/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory6.cs @@ -373,25 +373,25 @@ public unsafe partial struct IDWriteFactory6 : IDWriteFactory6.Interface, INativ /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(40)] - public HResult TranslateColorGlyphRun(System.Drawing.PointF baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers) + public HResult TranslateColorGlyphRun(Vector2 baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteFactory6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers); + return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteFactory6*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(41)] - public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, System.Drawing.PointF baselineOrigin, System.Drawing.PointF* glyphOrigins) + public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, Vector2 baselineOrigin, Vector2* glyphOrigins) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteFactory6*)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins); + return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteFactory6*)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(42)] - public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, System.Drawing.PointF baselineOrigin, Matrix3x2* worldAndDpiTransform, System.Drawing.PointF* glyphOrigins) + public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, Vector2 baselineOrigin, Matrix3x2* worldAndDpiTransform, Vector2* glyphOrigins) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteFactory6*)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins); + return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteFactory6*)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins); } /// diff --git a/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory7.cs b/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory7.cs index 0a6c2dd..607d7e4 100644 --- a/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory7.cs +++ b/src/Vortice.Win32.Graphics.DirectWrite/Generated/IDWriteFactory7.cs @@ -373,25 +373,25 @@ public unsafe partial struct IDWriteFactory7 : IDWriteFactory7.Interface, INativ /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(40)] - public HResult TranslateColorGlyphRun(System.Drawing.PointF baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers) + public HResult TranslateColorGlyphRun(Vector2 baselineOrigin, GlyphRun* glyphRun, GlyphRunDescription* glyphRunDescription, GlyphImageFormats desiredGlyphImageFormats, MeasuringMode measuringMode, Matrix3x2* worldAndDpiTransform, uint colorPaletteIndex, IDWriteColorGlyphRunEnumerator1** colorLayers) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteFactory7*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers); + return ((delegate* unmanaged[Stdcall])(lpVtbl[40]))((IDWriteFactory7*)Unsafe.AsPointer(ref this), baselineOrigin, glyphRun, glyphRunDescription, desiredGlyphImageFormats, measuringMode, worldAndDpiTransform, colorPaletteIndex, colorLayers); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(41)] - public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, System.Drawing.PointF baselineOrigin, System.Drawing.PointF* glyphOrigins) + public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, Vector2 baselineOrigin, Vector2* glyphOrigins) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteFactory7*)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins); + return ((delegate* unmanaged[Stdcall])(lpVtbl[41]))((IDWriteFactory7*)Unsafe.AsPointer(ref this), glyphRun, baselineOrigin, glyphOrigins); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(42)] - public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, System.Drawing.PointF baselineOrigin, Matrix3x2* worldAndDpiTransform, System.Drawing.PointF* glyphOrigins) + public HResult ComputeGlyphOrigins(GlyphRun* glyphRun, MeasuringMode measuringMode, Vector2 baselineOrigin, Matrix3x2* worldAndDpiTransform, Vector2* glyphOrigins) { - return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteFactory7*)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins); + return ((delegate* unmanaged[Stdcall])(lpVtbl[42]))((IDWriteFactory7*)Unsafe.AsPointer(ref this), glyphRun, measuringMode, baselineOrigin, worldAndDpiTransform, glyphOrigins); } /// diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D.Common/Graphics.Direct2D.Common.Structs.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D.Common/Graphics.Direct2D.Common.Structs.cs index f156bfb..8d6d79b 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D.Common/Graphics.Direct2D.Common.Structs.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D.Common/Graphics.Direct2D.Common.Structs.cs @@ -59,11 +59,11 @@ public partial struct RectU public partial struct BezierSegment { /// - public System.Drawing.PointF point1; + public Vector2 point1; /// - public System.Drawing.PointF point2; + public Vector2 point2; /// - public System.Drawing.PointF point3; + public Vector2 point3; } diff --git a/src/Vortice.Win32/Generated/Graphics/Direct2D.Common/ID2D1SimplifiedGeometrySink.cs b/src/Vortice.Win32/Generated/Graphics/Direct2D.Common/ID2D1SimplifiedGeometrySink.cs index 3ddeeb0..d48ed6c 100644 --- a/src/Vortice.Win32/Generated/Graphics/Direct2D.Common/ID2D1SimplifiedGeometrySink.cs +++ b/src/Vortice.Win32/Generated/Graphics/Direct2D.Common/ID2D1SimplifiedGeometrySink.cs @@ -93,17 +93,17 @@ public unsafe partial struct ID2D1SimplifiedGeometrySink : ID2D1SimplifiedGeomet /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(5)] - public void BeginFigure(System.Drawing.PointF startPoint, FigureBegin figureBegin) + public void BeginFigure(Vector2 startPoint, FigureBegin figureBegin) { - ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), startPoint, figureBegin); + ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), startPoint, figureBegin); } /// [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(6)] - public void AddLines(System.Drawing.PointF* points, uint pointsCount) + public void AddLines(Vector2* points, uint pointsCount) { - ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), points, pointsCount); + ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((ID2D1SimplifiedGeometrySink*)Unsafe.AsPointer(ref this), points, pointsCount); } /// @@ -139,10 +139,10 @@ public unsafe partial struct ID2D1SimplifiedGeometrySink : ID2D1SimplifiedGeomet void SetSegmentFlags(PathSegment vertexFlags); [VtblIndex(5)] - void BeginFigure(System.Drawing.PointF startPoint, FigureBegin figureBegin); + void BeginFigure(Vector2 startPoint, FigureBegin figureBegin); [VtblIndex(6)] - void AddLines(System.Drawing.PointF* points, uint pointsCount); + void AddLines(Vector2* points, uint pointsCount); [VtblIndex(7)] void AddBeziers(BezierSegment* beziers, uint beziersCount); diff --git a/src/Vortice.Win32/Graphics/Direct2D/PixelFormat.cs b/src/Vortice.Win32/Graphics/Direct2D/PixelFormat.cs index cd61353..43c254c 100644 --- a/src/Vortice.Win32/Graphics/Direct2D/PixelFormat.cs +++ b/src/Vortice.Win32/Graphics/Direct2D/PixelFormat.cs @@ -10,19 +10,19 @@ public partial struct PixelFormat /// /// An unkown with to and to . /// - public static readonly PixelFormat Unknown = new(Format.Unknown, AlphaMode.Unknown); + public static PixelFormat Unknown => new(Format.Unknown, AlphaMode.Unknown); /// /// A Premultiplied with to and to . /// - public static readonly PixelFormat Premultiplied = new(Format.Unknown, AlphaMode.Premultiplied); + public static PixelFormat Premultiplied => new(Format.Unknown, AlphaMode.Premultiplied); /// /// Initializes a new instance of the struct. /// /// The to use. /// A value that specifies whether the alpha channel is using pre-multiplied alpha, straight alpha, whether it should be ignored and considered opaque, or whether it is unknown. - public PixelFormat(Format format, AlphaMode alphaMode) + public PixelFormat(Format format = Format.Unknown, AlphaMode alphaMode = AlphaMode.Unknown) { this.format = format; this.alphaMode = alphaMode;