Esempio n. 1
0
        /// <summary>
        /// Creates a Bitmap from a WIC bitmap.
        /// </summary>
        /// <param name="renderTarget">The render target.</param>
        /// <param name="wicBitmap">The WIC bitmap.</param>
        /// <param name="bitmapProperties">The bitmap properties.</param>
        /// <returns></returns>
        /// <msdn-id>dd371797</msdn-id>
        /// <unmanaged>HRESULT ID2D1RenderTarget::CreateBitmapFromWicBitmap([In] IWICBitmapSource* wicBitmapSource,[In, Optional] const D2D1_BITMAP_PROPERTIES* bitmapProperties,[Out] ID2D1Bitmap** bitmap)</unmanaged>
        /// <unmanaged-short>ID2D1RenderTarget::CreateBitmapFromWicBitmap</unmanaged-short>
        public static Bitmap FromWicBitmap(RenderTarget renderTarget, WIC.BitmapSource wicBitmap, SharpDX.Direct2D1.BitmapProperties bitmapProperties)
        {
            Bitmap bitmap;

            renderTarget.CreateBitmapFromWicBitmap(wicBitmap, bitmapProperties, out bitmap);
            return(bitmap);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a Bitmap from a WIC bitmap.
        /// </summary>
        /// <param name="renderTarget">The render target.</param>
        /// <param name="wicBitmapSource">A reference to a <see cref="SharpDX.WIC.BitmapSource"/> WIC bitmap.</param>
        /// <returns></returns>
        /// <msdn-id>dd371797</msdn-id>
        /// <unmanaged>HRESULT ID2D1RenderTarget::CreateBitmapFromWicBitmap([In] IWICBitmapSource* wicBitmapSource,[In, Optional] const D2D1_BITMAP_PROPERTIES* bitmapProperties,[Out] ID2D1Bitmap** bitmap)</unmanaged>
        /// <unmanaged-short>ID2D1RenderTarget::CreateBitmapFromWicBitmap</unmanaged-short>
        public static Bitmap FromWicBitmap(RenderTarget renderTarget, WIC.BitmapSource wicBitmapSource)
        {
            Bitmap bitmap;

            renderTarget.CreateBitmapFromWicBitmap(wicBitmapSource, null, out bitmap);
            return(bitmap);
        }
Esempio n. 3
0
        /// <summary>
        /// Creates a Bitmap from a WIC bitmap.
        /// </summary>
        /// <param name="deviceContext">The render target.</param>
        /// <param name="wicBitmapSource">A reference to a <see cref="SharpDX.WIC.BitmapSource"/> WIC bitmap.</param>
        /// <returns></returns>
        /// <unmanaged>HRESULT ID2D1DeviceContext::CreateBitmapFromWicBitmap([In] IWICBitmapSource* wicBitmapSource,[In, Optional] const D2D1_BITMAP_PROPERTIES1* bitmapProperties,[Out] ID2D1Bitmap1** bitmap)</unmanaged>
        public static Bitmap1 FromWicBitmap(DeviceContext deviceContext, WIC.BitmapSource wicBitmapSource)
        {
            Bitmap1 bitmap;

            deviceContext.CreateBitmapFromWicBitmap(wicBitmapSource, null, out bitmap);
            return(bitmap);
        }
Esempio n. 4
0
        /// <summary>
        /// Creates a Bitmap from a WIC bitmap.
        /// </summary>
        /// <param name="deviceContext">The render target.</param>
        /// <param name="wicBitmap">The WIC bitmap.</param>
        /// <param name="bitmapProperties">The bitmap properties.</param>
        /// <returns></returns>
        /// <unmanaged>HRESULT ID2D1DeviceContext::CreateBitmapFromWicBitmap([In] IWICBitmapSource* wicBitmapSource,[In, Optional] const D2D1_BITMAP_PROPERTIES1* bitmapProperties,[Out] ID2D1Bitmap1** bitmap)</unmanaged>
        public static Bitmap1 FromWicBitmap(DeviceContext deviceContext, WIC.BitmapSource wicBitmap, SharpDX.Direct2D1.BitmapProperties1 bitmapProperties)
        {
            Bitmap1 bitmap;

            deviceContext.CreateBitmapFromWicBitmap(wicBitmap, bitmapProperties, out bitmap);
            return(bitmap);
        }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ImageSourceFromWic"/>.
 /// </summary>
 public ImageSourceFromWic(DeviceContext2 context2, WIC.BitmapSource wicBitmapSource, ImageSourceLoadingOptions loadingOptions, AlphaMode alphaMode)
     : this(IntPtr.Zero)
 {
     context2.CreateImageSourceFromWic(wicBitmapSource, loadingOptions, alphaMode, this);
 }