Beispiel #1
0
        public virtual void GetColorContext(
            out ID2D1ColorContext colorContext
            )
        {
            var fp = GetFunctionPointer(11);

            if (m_GetColorContextFunc == null)
            {
                m_GetColorContextFunc = (GetColorContextFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetColorContextFunc));
            }
            colorContext = new ID2D1ColorContext();
            m_GetColorContextFunc(m_ptr, out colorContext.PtrForNew);
        }
        public virtual int CreateColorContextFromFilename(
            ref ushort filename,
            out ID2D1ColorContext colorContext
            )
        {
            var fp = GetFunctionPointer(60);

            if (m_CreateColorContextFromFilenameFunc == null)
            {
                m_CreateColorContextFromFilenameFunc = (CreateColorContextFromFilenameFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateColorContextFromFilenameFunc));
            }
            colorContext = new ID2D1ColorContext();
            return(m_CreateColorContextFromFilenameFunc(m_ptr, ref filename, out colorContext.PtrForNew));
        }
        public virtual int CreateColorContextFromWicColorContext(
            IWICColorContext wicColorContext,
            out ID2D1ColorContext colorContext
            )
        {
            var fp = GetFunctionPointer(61);

            if (m_CreateColorContextFromWicColorContextFunc == null)
            {
                m_CreateColorContextFromWicColorContextFunc = (CreateColorContextFromWicColorContextFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateColorContextFromWicColorContextFunc));
            }
            colorContext = new ID2D1ColorContext();
            return(m_CreateColorContextFromWicColorContextFunc(m_ptr, wicColorContext != null ? wicColorContext.Ptr : IntPtr.Zero, out colorContext.PtrForNew));
        }
        public virtual int CreateColorContext(
            D2D1_COLOR_SPACE space,
            ref byte profile,
            uint profileSize,
            out ID2D1ColorContext colorContext
            )
        {
            var fp = GetFunctionPointer(59);

            if (m_CreateColorContextFunc == null)
            {
                m_CreateColorContextFunc = (CreateColorContextFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateColorContextFunc));
            }
            colorContext = new ID2D1ColorContext();
            return(m_CreateColorContextFunc(m_ptr, space, ref profile, profileSize, out colorContext.PtrForNew));
        }