Пример #1
0
        static CGRect GetCharacterBounds(NSRange characterRange, NSLayoutManager layoutManager, NSTextContainer textContainer)
        {
            var glyphRange = new NSRange();

            layoutManager.GetCharacterRange(characterRange, out glyphRange);

            return(layoutManager.GetBoundingRect(glyphRange, textContainer));
        }
Пример #2
0
        static CGRect GetCharacterBounds(NSRange characterRange, NSLayoutManager layoutManager, NSTextContainer textContainer)
        {
            var glyphRange = new NSRange();

#if __MOBILE__
            layoutManager.GetCharacterRange(characterRange, out glyphRange);
#else
#pragma warning disable CS0618 // Type or member is obsolete
            layoutManager.CharacterRangeForGlyphRange(characterRange, out glyphRange);
#pragma warning restore CS0618 // Type or member is obsolete
#endif
            return(layoutManager.GetBoundingRect(glyphRange, textContainer));
        }