using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using TerraFX.Interop.Windows; #pragma warning disable CS0649 namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMapperManagers; /// /// The transform mapper manager type to use with built-in effects. /// [Guid("02E6D48D-B892-4FBC-AA54-119203BAB802")] internal unsafe struct ID2D1TransformMapperManager { /// /// Gets the for (02E6D48D-B892-4FBC-AA54-119203BAB802). /// public static ref readonly Guid Guid { get { ReadOnlySpan data = new byte[] { 0x02, 0xE6, 0xD4, 0x8D, 0xB8, 0x92, 0x4F, 0xBC, 0xAA, 0x54, 0x11, 0x92, 0x03, 0xBA, 0xB8, 0x02 }; return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); } } /// /// The vtable for the current instance. /// private readonly void** lpVtbl; /// /// Performs the inverse mapping to . /// /// The input instance. /// An array of input rectangles to be mapped to the output rectangle. /// An array of input rectangles to be mapped to the opaque output rectangle. /// The number of inputs specified. /// The output rectangle that maps to the corresponding input rectangle. /// The output rectangle that maps to the corresponding opaque input rectangle. /// An for the operation. [MethodImpl(MethodImplOptions.AggressiveInlining)] public HRESULT MapInputRectsToOutputRect( ID2D1DrawInfoUpdateContex* updateContext, RECT* inputRects, RECT* inputOpaqueSubRects, uint inputRectCount, RECT* outputRect, RECT* outputOpaqueSubRect) { return ((delegate* unmanaged[Stdcall])this.lpVtbl[3])( (ID2D1TransformMapperManager*)Unsafe.AsPointer(ref this), updateContext, inputRects, inputOpaqueSubRects, inputRectCount, outputRect, outputOpaqueSubRect); } /// /// Allows a transform to state how it would map a rectangle requested on its output to a set of sample rectangles on its input. /// /// The output rectangle from which the inputs must be mapped. /// The corresponding set of inputs. The inputs will directly correspond to the transform inputs. /// The number of inputs specified. /// An for the operation. [MethodImpl(MethodImplOptions.AggressiveInlining)] public HRESULT MapOutputRectToInputRects( RECT* outputRect, RECT* inputRects, uint inputRectsCount) { return ((delegate* unmanaged[Stdcall])this.lpVtbl[4])( (ID2D1TransformMapperManager*)Unsafe.AsPointer(ref this), outputRect, inputRects, inputRectsCount); } /// /// Sets the input rectangles for this rendering pass into the transform. /// /// The index of the input rectangle. /// The invalid input rectangle. /// The output rectangle to which the input rectangle must be mapped. /// An for the operation. [MethodImpl(MethodImplOptions.AggressiveInlining)] public HRESULT MapInvalidRect( uint inputIndex, RECT invalidInputRect, RECT* invalidOutputRect) { return ((delegate* unmanaged[Stdcall])this.lpVtbl[5])( (ID2D1TransformMapperManager*)Unsafe.AsPointer(ref this), inputIndex, invalidInputRect, invalidOutputRect); } }