コード例 #1
0
        public UGTextLayout(IUGContext context, string textString, IUGTextFormat textFormat, UGSize requestedSize)
        {
            var device = ((UGContext)context).Device;
            var format = ((UGTextFormat)textFormat).Native;

            _native = new CanvasTextLayout(device, textString, format, requestedSize.Width, requestedSize.Height);
        }
コード例 #2
0
        public UGTextLayout(IUGContext context, string textString, IUGTextFormat textFormat, UGSize requestedSize)
        {
            _textFormat    = (UGTextFormat)textFormat;
            _textString    = textString;
            _requestedSize = requestedSize;

            _scale = context.ScaleFactor;
        }
コード例 #3
0
 public UGTextLayout(IUGContext context, string textString, IUGTextFormat textFormat)
     : this(context, textString, textFormat, UGSize.MaxValue)
 {
 }
コード例 #4
0
 public UGTextLayout(IUGContext context, string textString, IUGTextFormat textFormat, UGSize requestedSize)
 {
     _native        = new NSString(textString);
     _textFormat    = (UGTextFormat)textFormat;
     _requestedSize = requestedSize;
 }