Esempio n. 1
0
        public void NSLayoutManager_DrawGlyphsForGlyphRange()
        {
#if NET
            manager.DrawGlyphs(new NSRange(0, 4), new CGPoint(10, 10));
#else
            manager.DrawGlyphsForGlyphRange(new NSRange(0, 4), new CGPoint(10, 10));
#endif
        }
Esempio n. 2
0
        public override void DrawText(CGRect rect)
        {
            _drawRect = GetDrawRect(rect);
            base.DrawText(_drawRect);

            if (FeatureConfiguration.TextBlock.ShowHyperlinkLayouts)
            {
                UpdateHyperlinkLayout();
                _layoutManager?.DrawGlyphs(new NSRange(0, Text.Length), _drawRect.Location);
            }
        }
Esempio n. 3
0
 public override void Draw(CGRect rect)
 {
     _drawRect = GetDrawRect(rect);
     if (UseLayoutManager)
     {
         _layoutManager?.DrawGlyphs(new NSRange(0, (nint)_layoutManager.NumberOfGlyphs), _drawRect.Location);
     }
     else
     {
         _attributedString?.DrawString(_drawRect, NSStringDrawingOptions.UsesLineFragmentOrigin, null);
     }
 }
Esempio n. 4
0
 public static void DrawString(NSAttributedString str, PointF point, SizeF?availableSize = null)
 {
     SetContainerSize(availableSize);
     storage.SetString(str);
     layout.DrawGlyphs(new NSRange(0, (int)str.Length), point.ToNS());
 }