Beispiel #1
0
        public virtual int HitTestTextPosition(
            uint textPosition,
            int isTrailingHit,
            out float pointX,
            out float pointY,
            out DWRITE_HIT_TEST_METRICS hitTestMetrics
            )
        {
            var fp = GetFunctionPointer(65);

            if (m_HitTestTextPositionFunc == null)
            {
                m_HitTestTextPositionFunc = (HitTestTextPositionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(HitTestTextPositionFunc));
            }

            return(m_HitTestTextPositionFunc(m_ptr, textPosition, isTrailingHit, out pointX, out pointY, out hitTestMetrics));
        }
Beispiel #2
0
        public virtual int HitTestPoint(
            float pointX,
            float pointY,
            out int isTrailingHit,
            out int isInside,
            out DWRITE_HIT_TEST_METRICS hitTestMetrics
            )
        {
            var fp = GetFunctionPointer(64);

            if (m_HitTestPointFunc == null)
            {
                m_HitTestPointFunc = (HitTestPointFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(HitTestPointFunc));
            }

            return(m_HitTestPointFunc(m_ptr, pointX, pointY, out isTrailingHit, out isInside, out hitTestMetrics));
        }
Beispiel #3
0
        public virtual int HitTestTextRange(
            uint textPosition,
            uint textLength,
            float originX,
            float originY,
            out DWRITE_HIT_TEST_METRICS hitTestMetrics,
            uint maxHitTestMetricsCount,
            out uint actualHitTestMetricsCount
            )
        {
            var fp = GetFunctionPointer(66);

            if (m_HitTestTextRangeFunc == null)
            {
                m_HitTestTextRangeFunc = (HitTestTextRangeFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(HitTestTextRangeFunc));
            }

            return(m_HitTestTextRangeFunc(m_ptr, textPosition, textLength, originX, originY, out hitTestMetrics, maxHitTestMetricsCount, out actualHitTestMetricsCount));
        }