Esempio n. 1
0
 /// <inheritdoc />
 public virtual void PutTextLines(string[] lines, double x, double y, int fontSize, double leading)
 {
     foreach (var line in lines)
     {
         PutText(line, x, y, fontSize, false);
         y -= FontMetrics.LineHeight(fontSize) + leading;
     }
 }
Esempio n. 2
0
        public override void PutTextLines(string[] lines, double x, double y, int fontSize, double leading)
        {
            x *= MmToPt;
            y *= MmToPt;
            float lineHeight = (float)((FontMetrics.LineHeight(fontSize) + leading) * MmToPt);

            SetFont(false, fontSize);

            _canvas.BeginText()
            .BeginText()
            .MoveText(x, y)
            .SetLeading(lineHeight);

            bool isFirstLine = true;

            foreach (string line in lines)
            {
                if (isFirstLine)
                {
                    _canvas.ShowText(line);
                    isFirstLine = false;
                }
                else
                {
                    _canvas.NewlineShowText(line);
                }
            }

            _canvas.EndText();
        }