public static extern int WICCreateBitmapFromSection( uint width, uint height, ref Guid pixelFormat, IntPtr hSection, uint stride, uint offset, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CustomMarshaler <IWICBitmap>))] out IWICBitmap ppIBitmap );
public virtual int CreateBitmapFromHICON( IntPtr hIcon, out IWICBitmap ppIBitmap ) { var fp = GetFunctionPointer(22); if (m_CreateBitmapFromHICONFunc == null) { m_CreateBitmapFromHICONFunc = (CreateBitmapFromHICONFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFromHICONFunc)); } ppIBitmap = new IWICBitmap(); return(m_CreateBitmapFromHICONFunc(m_ptr, hIcon, out ppIBitmap.PtrForNew)); }
public virtual int CreateBitmapFromSource( IWICBitmapSource pIBitmapSource, WICBitmapCreateCacheOption option, out IWICBitmap ppIBitmap ) { var fp = GetFunctionPointer(18); if (m_CreateBitmapFromSourceFunc == null) { m_CreateBitmapFromSourceFunc = (CreateBitmapFromSourceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFromSourceFunc)); } ppIBitmap = new IWICBitmap(); return(m_CreateBitmapFromSourceFunc(m_ptr, pIBitmapSource != null ? pIBitmapSource.Ptr : IntPtr.Zero, option, out ppIBitmap.PtrForNew)); }
public virtual int CreateWicBitmapRenderTarget( IWICBitmap target, ref D2D1_RENDER_TARGET_PROPERTIES renderTargetProperties, out ID2D1RenderTarget renderTarget ) { var fp = GetFunctionPointer(13); if (m_CreateWicBitmapRenderTargetFunc == null) { m_CreateWicBitmapRenderTargetFunc = (CreateWicBitmapRenderTargetFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateWicBitmapRenderTargetFunc)); } renderTarget = new ID2D1RenderTarget(); return(m_CreateWicBitmapRenderTargetFunc(m_ptr, target != null ? target.Ptr : IntPtr.Zero, ref renderTargetProperties, out renderTarget.PtrForNew)); }
public virtual int CreateBitmapFromHBITMAP( out HBITMAP__ hBitmap, out HPALETTE__ hPalette, WICBitmapAlphaChannelOption options, out IWICBitmap ppIBitmap ) { var fp = GetFunctionPointer(21); if (m_CreateBitmapFromHBITMAPFunc == null) { m_CreateBitmapFromHBITMAPFunc = (CreateBitmapFromHBITMAPFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFromHBITMAPFunc)); } ppIBitmap = new IWICBitmap(); return(m_CreateBitmapFromHBITMAPFunc(m_ptr, out hBitmap, out hPalette, options, out ppIBitmap.PtrForNew)); }
public virtual int CreateBitmap( uint uiWidth, uint uiHeight, ref Guid pixelFormat, WICBitmapCreateCacheOption option, out IWICBitmap ppIBitmap ) { var fp = GetFunctionPointer(17); if (m_CreateBitmapFunc == null) { m_CreateBitmapFunc = (CreateBitmapFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFunc)); } ppIBitmap = new IWICBitmap(); return(m_CreateBitmapFunc(m_ptr, uiWidth, uiHeight, ref pixelFormat, option, out ppIBitmap.PtrForNew)); }
public virtual int CreateBitmapFromSourceRect( IWICBitmapSource pIBitmapSource, uint x, uint y, uint width, uint height, out IWICBitmap ppIBitmap ) { var fp = GetFunctionPointer(19); if (m_CreateBitmapFromSourceRectFunc == null) { m_CreateBitmapFromSourceRectFunc = (CreateBitmapFromSourceRectFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFromSourceRectFunc)); } ppIBitmap = new IWICBitmap(); return(m_CreateBitmapFromSourceRectFunc(m_ptr, pIBitmapSource != null ? pIBitmapSource.Ptr : IntPtr.Zero, x, y, width, height, out ppIBitmap.PtrForNew)); }
public virtual int CreateBitmapFromMemory( uint uiWidth, uint uiHeight, ref Guid pixelFormat, uint cbStride, uint cbBufferSize, out byte pbBuffer, out IWICBitmap ppIBitmap ) { var fp = GetFunctionPointer(20); if (m_CreateBitmapFromMemoryFunc == null) { m_CreateBitmapFromMemoryFunc = (CreateBitmapFromMemoryFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateBitmapFromMemoryFunc)); } ppIBitmap = new IWICBitmap(); return(m_CreateBitmapFromMemoryFunc(m_ptr, uiWidth, uiHeight, ref pixelFormat, cbStride, cbBufferSize, out pbBuffer, out ppIBitmap.PtrForNew)); }