Exemplo n.º 1
0
        private void CreateAndPrintText()
        {
            pictureBox1.Refresh();

            var font1 = new Font("Arial Black", 24f, FontStyle.Bold);
            var font2 = new Font("Corbel", 18f, FontStyle.Italic);
            var font3 = new Font("Imprint MT Shadow", 44f, FontStyle.Regular);

            var horisontal = new HorizontalText();
            var vertical   = new VerticalText();

            baseWrites.AddRange(Create(horisontal, "Horizontal", font1, StringAlignment.Near, 6));
            baseWrites.AddRange(Create(horisontal, "Horizontal", font2, StringAlignment.Center, 7));
            baseWrites.AddRange(Create(vertical, "Vertical", font3, StringAlignment.Near, 1));

            textOutput.DrawText(pictureBox1.CreateGraphics(), startPoint, baseWrites);
        }