Пример #1
0
        public virtual void GetGradientStops(
            out D2D1_GRADIENT_STOP gradientStops,
            uint gradientStopsCount
            )
        {
            var fp = GetFunctionPointer(5);

            if (m_GetGradientStopsFunc == null)
            {
                m_GetGradientStopsFunc = (GetGradientStopsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetGradientStopsFunc));
            }

            m_GetGradientStopsFunc(m_ptr, out gradientStops, gradientStopsCount);
        }
Пример #2
0
        public virtual int CreateGradientStopCollection(
            ref D2D1_GRADIENT_STOP gradientStops,
            uint gradientStopsCount,
            D2D1_GAMMA colorInterpolationGamma,
            D2D1_EXTEND_MODE extendMode,
            out ID2D1GradientStopCollection gradientStopCollection
            )
        {
            var fp = GetFunctionPointer(9);

            if (m_CreateGradientStopCollectionFunc == null)
            {
                m_CreateGradientStopCollectionFunc = (CreateGradientStopCollectionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateGradientStopCollectionFunc));
            }
            gradientStopCollection = new ID2D1GradientStopCollection();
            return(m_CreateGradientStopCollectionFunc(m_ptr, ref gradientStops, gradientStopsCount, colorInterpolationGamma, extendMode, out gradientStopCollection.PtrForNew));
        }
Пример #3
0
        public virtual int CreateGradientStopCollection(
            ref D2D1_GRADIENT_STOP straightAlphaGradientStops,
            uint straightAlphaGradientStopsCount,
            D2D1_COLOR_SPACE preInterpolationSpace,
            D2D1_COLOR_SPACE postInterpolationSpace,
            D2D1_BUFFER_PRECISION bufferPrecision,
            D2D1_EXTEND_MODE extendMode,
            D2D1_COLOR_INTERPOLATION_MODE colorInterpolationMode,
            out ID2D1GradientStopCollection1 gradientStopCollection1
            )
        {
            var fp = GetFunctionPointer(64);

            if (m_CreateGradientStopCollectionFunc == null)
            {
                m_CreateGradientStopCollectionFunc = (CreateGradientStopCollectionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateGradientStopCollectionFunc));
            }
            gradientStopCollection1 = new ID2D1GradientStopCollection1();
            return(m_CreateGradientStopCollectionFunc(m_ptr, ref straightAlphaGradientStops, straightAlphaGradientStopsCount, preInterpolationSpace, postInterpolationSpace, bufferPrecision, extendMode, colorInterpolationMode, out gradientStopCollection1.PtrForNew));
        }