示例#1
0
        void IPainter.PaintText(string text, Point atPoint, int pixelHeight, int argb, int spaceBetweenCharacters, FontBasePainter.TextDirection direction)
        {
            var state = PdfGraphics.Save();

            var font = GetPdfFont(pixelHeight);

            if (direction == FontBasePainter.TextDirection.VerticalUpward)
            {
                PdfGraphics.RotateAtTransform(-90, new XPoint(atPoint.X + Shift.Width, atPoint.Y + Shift.Height));
            }

            PdfGraphics.DrawString(text ?? "", font, GetBrush(argb), atPoint.X + Shift.Width, atPoint.Y + Shift.Height + pixelHeight);

            PdfGraphics.Restore(state);
        }