/// <summary> /// Creates an <see cref="SharpDX.Direct2D1.Bitmap"/> whose data is shared with another resource. /// </summary> /// <param name="deviceContext">an instance of <see cref = "SharpDX.Direct2D1.RenderTarget" /></param> /// <param name="surface">An <see cref="SharpDX.DXGI.Surface"/> that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.</param> /// <param name="bitmapProperties">The pixel format and DPI of the bitmap to create . The <see cref="SharpDX.DXGI.Format"/> portion of the pixel format must match the <see cref="SharpDX.DXGI.Format"/> of data or the method will fail, but the alpha modes don't have to match. To prevent a mismatch, you can pass NULL or the value obtained from the {{D2D1::PixelFormat}} helper function. The DPI settings do not have to match those of data. If both dpiX and dpiY are 0.0f, the default DPI, 96, is used.</param> /// <unmanaged>HRESULT ID2D1DeviceContext::CreateBitmapFromDxgiSurface([In] IDXGISurface* surface,[In, Optional] const D2D1_BITMAP_PROPERTIES1* bitmapProperties,[Out, Fast] ID2D1Bitmap1** bitmap1)</unmanaged> public Bitmap1(DeviceContext deviceContext, Surface surface, SharpDX.Direct2D1.BitmapProperties1 bitmapProperties) : base(IntPtr.Zero) { deviceContext.CreateBitmapFromDxgiSurface(surface, bitmapProperties, this); }
/// <summary> /// Creates an <see cref="SharpDX.Direct2D1.Bitmap"/> whose data is shared with another resource. /// </summary> /// <param name="deviceContext">an instance of <see cref = "SharpDX.Direct2D1.RenderTarget" /></param> /// <param name="surface">An <see cref="SharpDX.DXGI.Surface"/> that contains the data to share with the new ID2D1Bitmap. For more information, see the Remarks section.</param> /// <unmanaged>HRESULT ID2D1DeviceContext::CreateBitmapFromDxgiSurface([In] IDXGISurface* surface,[In, Optional] const D2D1_BITMAP_PROPERTIES1* bitmapProperties,[Out, Fast] ID2D1Bitmap1** bitmap1)</unmanaged> public Bitmap1(DeviceContext deviceContext, Surface surface) : base(IntPtr.Zero) { deviceContext.CreateBitmapFromDxgiSurface(surface, null, this); }