public virtual void RestoreDrawingState(
            ID2D1DrawingStateBlock drawingStateBlock
            )
        {
            var fp = GetFunctionPointer(44);

            if (m_RestoreDrawingStateFunc == null)
            {
                m_RestoreDrawingStateFunc = (RestoreDrawingStateFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(RestoreDrawingStateFunc));
            }

            m_RestoreDrawingStateFunc(m_ptr, drawingStateBlock != null ? drawingStateBlock.Ptr : IntPtr.Zero);
        }
Exemple #2
0
        public virtual int CreateDrawingStateBlock(
            ref D2D1_DRAWING_STATE_DESCRIPTION drawingStateDescription,
            IDWriteRenderingParams textRenderingParams,
            out ID2D1DrawingStateBlock drawingStateBlock
            )
        {
            var fp = GetFunctionPointer(12);

            if (m_CreateDrawingStateBlockFunc == null)
            {
                m_CreateDrawingStateBlockFunc = (CreateDrawingStateBlockFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateDrawingStateBlockFunc));
            }
            drawingStateBlock = new ID2D1DrawingStateBlock();
            return(m_CreateDrawingStateBlockFunc(m_ptr, ref drawingStateDescription, textRenderingParams != null ? textRenderingParams.Ptr : IntPtr.Zero, out drawingStateBlock.PtrForNew));
        }