Exemplo n.º 1
0
        public virtual int CopyFromMemory(
            ref D2D_RECT_U dstRect,
            IntPtr srcData,
            uint pitch
            )
        {
            var fp = GetFunctionPointer(10);

            if (m_CopyFromMemoryFunc == null)
            {
                m_CopyFromMemoryFunc = (CopyFromMemoryFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CopyFromMemoryFunc));
            }

            return(m_CopyFromMemoryFunc(m_ptr, ref dstRect, srcData, pitch));
        }
Exemplo n.º 2
0
        public virtual int CopyFromBitmap(
            ref D2D_POINT_2U destPoint,
            ID2D1Bitmap bitmap,
            ref D2D_RECT_U srcRect
            )
        {
            var fp = GetFunctionPointer(8);

            if (m_CopyFromBitmapFunc == null)
            {
                m_CopyFromBitmapFunc = (CopyFromBitmapFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CopyFromBitmapFunc));
            }

            return(m_CopyFromBitmapFunc(m_ptr, ref destPoint, bitmap != null ? bitmap.Ptr : IntPtr.Zero, ref srcRect));
        }
Exemplo n.º 3
0
        public virtual int CopyFromRenderTarget(
            ref D2D_POINT_2U destPoint,
            ID2D1RenderTarget renderTarget,
            ref D2D_RECT_U srcRect
            )
        {
            var fp = GetFunctionPointer(9);

            if (m_CopyFromRenderTargetFunc == null)
            {
                m_CopyFromRenderTargetFunc = (CopyFromRenderTargetFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CopyFromRenderTargetFunc));
            }

            return(m_CopyFromRenderTargetFunc(m_ptr, ref destPoint, renderTarget != null ? renderTarget.Ptr : IntPtr.Zero, ref srcRect));
        }