예제 #1
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));
        }
예제 #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));
        }
예제 #3
0
        public virtual int Draw(
            ID2D1Bitmap1 target,
            ref tagRECT drawRect,
            D2D_POINT_2U targetOrigin
            )
        {
            var fp = GetFunctionPointer(8);

            if (m_DrawFunc == null)
            {
                m_DrawFunc = (DrawFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawFunc));
            }

            return(m_DrawFunc(m_ptr, target != null ? target.Ptr : IntPtr.Zero, ref drawRect, targetOrigin));
        }