Add bindings for new Win2D exports for ICanvasEffect
このコミットが含まれているのは:
1 親
683e1061f2
コミット
10a3788224
3ファイル変更
+67
-2
検索条件に一致するファイルはありません
@@ -6,7 +6,7 @@ using TerraFX.Interop.Windows;
|
||||
|
||||
#pragma warning disable CS0649, IDE1006
|
||||
|
||||
namespace ABI.Microsoft.Graphics.Canvas;
|
||||
namespace ABI.Microsoft.Graphics.Canvas.Effects;
|
||||
|
||||
/// <summary>
|
||||
/// The native WinRT interface for <see cref="global::Microsoft.Graphics.Canvas.Effects.ICanvasEffect"/> objects.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using ABI.Microsoft.Graphics.Canvas.Effects;
|
||||
using TerraFX.Interop;
|
||||
using Windows.Foundation;
|
||||
|
||||
@@ -19,9 +20,73 @@ internal static unsafe class Win2D
|
||||
/// <param name="rect">The resulting bounds.</param>
|
||||
/// <returns>The <see cref="TerraFX.Interop.Windows.HRESULT"/> for the operation.</returns>
|
||||
[DllImport("Microsoft.Graphics.Canvas.dll", PreserveSig = true, ExactSpelling = true)]
|
||||
[return: NativeTypeName("HRESULT")]
|
||||
public static extern int GetBoundsForICanvasImageInterop(
|
||||
ICanvasResourceCreator* resourceCreator,
|
||||
ICanvasImageInterop* image,
|
||||
[NativeTypeName("Windows::Foundation::Numerics::Matrix3x2 const*")] Matrix3x2* transform,
|
||||
Rect* rect);
|
||||
|
||||
/// <summary>
|
||||
/// Implements support for <see cref="global::Microsoft.Graphics.Canvas.Effects.ICanvasEffect.InvalidateSourceRectangle"/> for an external <see cref="ICanvasImageInterop"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="resourceCreator">The input <see cref="ICanvasResourceCreatorWithDpi"/> instance to use to perform the operation.</param>
|
||||
/// <param name="image">The target <see cref="ICanvasImageInterop"/> instance to execute the operation upon.</param>
|
||||
/// <param name="sourceIndex">The input index to invalidate.</param>
|
||||
/// <param name="invalidRectangle">The rectangle to invalidate.</param>
|
||||
/// <returns>The <see cref="TerraFX.Interop.Windows.HRESULT"/> for the operation.</returns>
|
||||
[DllImport("Microsoft.Graphics.Canvas.dll", PreserveSig = true, ExactSpelling = true)]
|
||||
[return: NativeTypeName("HRESULT")]
|
||||
public static extern int InvalidateSourceRectangleForICanvasImageInterop(
|
||||
ICanvasResourceCreatorWithDpi* resourceCreator,
|
||||
ICanvasImageInterop* image,
|
||||
uint sourceIndex,
|
||||
[NativeTypeName("Windows::Foundation::Rect const*")] Rect* invalidRectangle);
|
||||
|
||||
/// <summary>
|
||||
/// Implements support for <see cref="global::Microsoft.Graphics.Canvas.Effects.ICanvasEffect.GetInvalidRectangles"/> for an external <see cref="ICanvasImageInterop"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="resourceCreator">The input <see cref="ICanvasResourceCreatorWithDpi"/> instance to use to perform the operation.</param>
|
||||
/// <param name="image">The target <see cref="ICanvasImageInterop"/> instance to execute the operation upon.</param>
|
||||
/// <param name="valueCount">The resulting length of the COM array returned via <paramref name="valueElements"/>.</param>
|
||||
/// <param name="valueElements">The COM array with the sequence of invalid rectangles for the effect.</param>
|
||||
/// <returns>The <see cref="TerraFX.Interop.Windows.HRESULT"/> for the operation.</returns>
|
||||
[DllImport("Microsoft.Graphics.Canvas.dll", PreserveSig = true, ExactSpelling = true)]
|
||||
[return: NativeTypeName("HRESULT")]
|
||||
public static extern int GetInvalidRectanglesForICanvasImageInterop(
|
||||
ICanvasResourceCreatorWithDpi* resourceCreator,
|
||||
ICanvasImageInterop* image,
|
||||
uint* valueCount,
|
||||
Rect** valueElements);
|
||||
|
||||
/// <summary>
|
||||
/// Implements support for <see cref="global::Microsoft.Graphics.Canvas.Effects.ICanvasEffect.GetRequiredSourceRectangle"/> and
|
||||
/// <see cref="global::Microsoft.Graphics.Canvas.Effects.ICanvasEffect.GetRequiredSourceRectangles"/> for an external <see cref="ICanvasImageInterop"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="resourceCreator">The input <see cref="ICanvasResourceCreatorWithDpi"/> instance to use to perform the operation.</param>
|
||||
/// <param name="image">The target <see cref="ICanvasImageInterop"/> instance to execute the operation upon.</param>
|
||||
/// <param name="outputRectangle">The portion of the output image whose inputs are being inspected.</param>
|
||||
/// <param name="sourceEffectCount">The length of the sequence of input effects.</param>
|
||||
/// <param name="sourceEffects">The sequence of input effects whose rectangles are being queries.</param>
|
||||
/// <param name="sourceIndexCount">The length of the sequence of indices for the input effects.</param>
|
||||
/// <param name="sourceIndices">The sequence of indices for the input effects.</param>
|
||||
/// <param name="sourceBoundsCount">The length of the sequence of bounds to consider.</param>
|
||||
/// <param name="sourceBounds">The sequence of bounds to consider in the resulting output.</param>
|
||||
/// <param name="valueCount">The number of elements provided in <paramref name="valueElements"/>.</param>
|
||||
/// <param name="valueElements">The sequence of resulting required rectangles to compute.</param>
|
||||
/// <returns>The <see cref="TerraFX.Interop.Windows.HRESULT"/> for the operation.</returns>
|
||||
[DllImport("Microsoft.Graphics.Canvas.dll", PreserveSig = true, ExactSpelling = true)]
|
||||
[return: NativeTypeName("HRESULT")]
|
||||
public static extern int GetRequiredSourceRectanglesForICanvasImageInterop(
|
||||
ICanvasResourceCreatorWithDpi* resourceCreator,
|
||||
ICanvasImageInterop* image,
|
||||
[NativeTypeName("Windows::Foundation::Rect const*")] Rect* outputRectangle,
|
||||
uint sourceEffectCount,
|
||||
[NativeTypeName("ABI::Microsoft::Graphics::Canvas::Effects::ICanvasEffect* const*")] ICanvasEffect** sourceEffects,
|
||||
uint sourceIndexCount,
|
||||
[NativeTypeName("uint32_t const*")] uint* sourceIndices,
|
||||
uint sourceBoundsCount,
|
||||
[NativeTypeName("Windows::Foundation::Rect const*")] Rect* sourceBounds,
|
||||
uint valueCount,
|
||||
Rect* valueElements);
|
||||
}
|
||||
@@ -2,9 +2,9 @@ using ABI.Microsoft.Graphics.Canvas;
|
||||
using ComputeSharp.D2D1.Interop;
|
||||
using ComputeSharp.Interop;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using Microsoft.Graphics.Canvas.Effects;
|
||||
using TerraFX.Interop.DirectX;
|
||||
using TerraFX.Interop.Windows;
|
||||
using ICanvasEffect = Microsoft.Graphics.Canvas.Effects.ICanvasEffect;
|
||||
|
||||
namespace ComputeSharp.D2D1.Uwp;
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする