Пример #1
0
        public virtual int IsSupported(
            ref D2D1_RENDER_TARGET_PROPERTIES renderTargetProperties
            )
        {
            var fp = GetFunctionPointer(56);

            if (m_IsSupportedFunc == null)
            {
                m_IsSupportedFunc = (IsSupportedFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(IsSupportedFunc));
            }

            return(m_IsSupportedFunc(m_ptr, ref renderTargetProperties));
        }
Пример #2
0
        public virtual int CreateDCRenderTarget(
            ref D2D1_RENDER_TARGET_PROPERTIES renderTargetProperties,
            out ID2D1DCRenderTarget dcRenderTarget
            )
        {
            var fp = GetFunctionPointer(16);

            if (m_CreateDCRenderTargetFunc == null)
            {
                m_CreateDCRenderTargetFunc = (CreateDCRenderTargetFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateDCRenderTargetFunc));
            }
            dcRenderTarget = new ID2D1DCRenderTarget();
            return(m_CreateDCRenderTargetFunc(m_ptr, ref renderTargetProperties, out dcRenderTarget.PtrForNew));
        }
Пример #3
0
        public virtual int CreateDxgiSurfaceRenderTarget(
            IDXGISurface dxgiSurface,
            ref D2D1_RENDER_TARGET_PROPERTIES renderTargetProperties,
            out ID2D1RenderTarget renderTarget
            )
        {
            var fp = GetFunctionPointer(15);

            if (m_CreateDxgiSurfaceRenderTargetFunc == null)
            {
                m_CreateDxgiSurfaceRenderTargetFunc = (CreateDxgiSurfaceRenderTargetFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateDxgiSurfaceRenderTargetFunc));
            }
            renderTarget = new ID2D1RenderTarget();
            return(m_CreateDxgiSurfaceRenderTargetFunc(m_ptr, dxgiSurface != null ? dxgiSurface.Ptr : IntPtr.Zero, ref renderTargetProperties, out renderTarget.PtrForNew));
        }
Пример #4
0
        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));
        }