コード例 #1
0
        public virtual int WriteSource(
            IWICBitmapSource pIBitmapSource,
            out WICRect prc
            )
        {
            var fp = GetFunctionPointer(11);

            if (m_WriteSourceFunc == null)
            {
                m_WriteSourceFunc = (WriteSourceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(WriteSourceFunc));
            }

            return(m_WriteSourceFunc(m_ptr, pIBitmapSource != null ? pIBitmapSource.Ptr : IntPtr.Zero, out prc));
        }
コード例 #2
0
        public virtual int Initialize(
            IWICBitmapSource pISource,
            ref WICRect prc
            )
        {
            var fp = GetFunctionPointer(8);

            if (m_InitializeFunc == null)
            {
                m_InitializeFunc = (InitializeFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(InitializeFunc));
            }

            return(m_InitializeFunc(m_ptr, pISource != null ? pISource.Ptr : IntPtr.Zero, ref prc));
        }
コード例 #3
0
ファイル: IWICBitmap.cs プロジェクト: ousttrue/ShrimpDX
        public virtual int Lock(
            ref WICRect prcLock,
            uint flags,
            out IWICBitmapLock ppILock
            )
        {
            var fp = GetFunctionPointer(8);

            if (m_LockFunc == null)
            {
                m_LockFunc = (LockFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(LockFunc));
            }
            ppILock = new IWICBitmapLock();
            return(m_LockFunc(m_ptr, ref prcLock, flags, out ppILock.PtrForNew));
        }
コード例 #4
0
        public virtual int WriteSource(
            out IWICBitmapSource ppPlanes,
            uint cPlanes,
            out WICRect prcSource
            )
        {
            var fp = GetFunctionPointer(4);

            if (m_WriteSourceFunc == null)
            {
                m_WriteSourceFunc = (WriteSourceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(WriteSourceFunc));
            }
            ppPlanes = new IWICBitmapSource();
            return(m_WriteSourceFunc(m_ptr, out ppPlanes.PtrForNew, cPlanes, out prcSource));
        }
コード例 #5
0
        public virtual int CopyBlocks(
            ref WICRect prcBoundsInBlocks,
            uint cbStride,
            uint cbBufferSize,
            out byte pbBuffer
            )
        {
            var fp = GetFunctionPointer(5);

            if (m_CopyBlocksFunc == null)
            {
                m_CopyBlocksFunc = (CopyBlocksFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CopyBlocksFunc));
            }

            return(m_CopyBlocksFunc(m_ptr, ref prcBoundsInBlocks, cbStride, cbBufferSize, out pbBuffer));
        }
コード例 #6
0
        public virtual int CopyPixels(
            ref WICRect prcSource,
            uint uiWidth,
            uint uiHeight,
            WICBitmapTransformOptions dstTransform,
            WICPlanarOptions dstPlanarOptions,
            ref WICBitmapPlane pDstPlanes,
            uint cPlanes
            )
        {
            var fp = GetFunctionPointer(4);

            if (m_CopyPixelsFunc == null)
            {
                m_CopyPixelsFunc = (CopyPixelsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CopyPixelsFunc));
            }

            return(m_CopyPixelsFunc(m_ptr, ref prcSource, uiWidth, uiHeight, dstTransform, dstPlanarOptions, ref pDstPlanes, cPlanes));
        }
コード例 #7
0
        public virtual int CopyPixels(
            ref WICRect prc,
            uint uiWidth,
            uint uiHeight,
            out Guid pguidDstFormat,
            WICBitmapTransformOptions dstTransform,
            uint nStride,
            uint cbBufferSize,
            out byte pbBuffer
            )
        {
            var fp = GetFunctionPointer(3);

            if (m_CopyPixelsFunc == null)
            {
                m_CopyPixelsFunc = (CopyPixelsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CopyPixelsFunc));
            }

            return(m_CopyPixelsFunc(m_ptr, ref prc, uiWidth, uiHeight, out pguidDstFormat, dstTransform, nStride, cbBufferSize, out pbBuffer));
        }