/// <summary> /// Creates an <see cref="ID2D1DeviceContext"/> instance. /// </summary> /// <param name="d2D1Device">The input <see cref="ID2D1Device"/> instance to use to create the context.</param> /// <returns>A new <see cref="ID2D1DeviceContext"/> instance.</returns> public static unsafe ComPtr <ID2D1DeviceContext> CreateD2D1DeviceContext(ID2D1Device *d2D1Device) { using ComPtr <ID2D1DeviceContext> d2D1DeviceContext = default; // Create a D2D1 device context d2D1Device->CreateDeviceContext( options: D2D1_DEVICE_CONTEXT_OPTIONS.D2D1_DEVICE_CONTEXT_OPTIONS_NONE, deviceContext: d2D1DeviceContext.GetAddressOf()).Assert(); return(d2D1DeviceContext.Move()); }
public int CreateImageEncoder([NativeTypeName("ID2D1Device *")] ID2D1Device *pD2DDevice, [NativeTypeName("IWICImageEncoder **")] IWICImageEncoder **ppWICImageEncoder) { return(((delegate * unmanaged[Stdcall] < IWICImagingFactory2 *, ID2D1Device *, IWICImageEncoder **, int >)(lpVtbl[28]))((IWICImagingFactory2 *)Unsafe.AsPointer(ref this), pD2DDevice, ppWICImageEncoder)); }
public HRESULT CreateImageEncoder(ID2D1Device *pD2DDevice, IWICImageEncoder **ppWICImageEncoder) { return(((delegate * unmanaged <IWICImagingFactory2 *, ID2D1Device *, IWICImageEncoder **, int>)(lpVtbl[28]))((IWICImagingFactory2 *)Unsafe.AsPointer(ref this), pD2DDevice, ppWICImageEncoder)); }