/// <summary> /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory" />. /// </summary> public Factory(FactoryType factoryType, DebugLevel debugLevel) : base(IntPtr.Zero) { FactoryOptions?options = null; if (debugLevel != DebugLevel.None) { options = new FactoryOptions() { DebugLevel = debugLevel } } ; IntPtr temp; D2D1.CreateFactory(factoryType, Utilities.GetGuidFromType(GetType()), options, out temp); FromTemp(temp); }
/// <summary> /// Initializes a new instance of the <see cref="Device"/> class. /// </summary> /// <param name="device">The device.</param> /// <param name="creationProperties">The creation properties.</param> /// <unmanaged>HRESULT D2D1CreateDevice([In] IDXGIDevice* dxgiDevice,[In, Optional] const D2D1_CREATION_PROPERTIES* creationProperties,[Out] ID2D1Device** d2dDevice)</unmanaged> public Device(SharpDX.DXGI.Device device, CreationProperties creationProperties) : base(IntPtr.Zero) { D2D1.CreateDevice(device, creationProperties, this); }
/// <summary> /// Initializes a new instance of the <see cref="Device"/> class. /// </summary> /// <param name="device">The device.</param> /// <unmanaged>HRESULT D2D1CreateDevice([In] IDXGIDevice* dxgiDevice,[In, Optional] const D2D1_CREATION_PROPERTIES* creationProperties,[Out] ID2D1Device** d2dDevice)</unmanaged> public Device(SharpDX.DXGI.Device device) : base(IntPtr.Zero) { D2D1.CreateDevice(device, null, this); }
/// <summary> /// Initializes a new instance of the <see cref="Device"/> class. /// </summary> /// <param name="surface">The surface.</param> /// <param name="creationProperties">The creation properties.</param> /// <unmanaged>HRESULT D2D1CreateDeviceContext([In] IDXGISurface* dxgiSurface,[In, Optional] const D2D1_CREATION_PROPERTIES* creationProperties,[Out] ID2D1DeviceContext** d2dDeviceContext)</unmanaged> public DeviceContext(SharpDX.DXGI.Surface surface, CreationProperties creationProperties) : base(IntPtr.Zero) { D2D1.CreateDeviceContext(surface, creationProperties, this); }
/// <summary> /// Initializes a new instance of the <see cref="DeviceContext"/> class. /// </summary> /// <param name="surface">The surface.</param> /// <unmanaged>HRESULT D2D1CreateDeviceContext([In] IDXGISurface* dxgiSurface,[In, Optional] const D2D1_CREATION_PROPERTIES* creationProperties,[Out] ID2D1DeviceContext** d2dDeviceContext)</unmanaged> public DeviceContext(SharpDX.DXGI.Surface surface) : base(IntPtr.Zero) { D2D1.CreateDeviceContext(surface, null, this); }