Vertical Text

Drawing Text Layout

Draws different vertical texts.

Сode Snippet

using (var bitmap = new Bitmap(500, 500, PixelFormat.Format32bppArgb, RgbColor.White))
using (var gr = bitmap.GetAdvancedGraphics())
{
    var text = new Text();
    text.String = Texts.LoremIpsum;
    text.CharStyle.Size = 20;

    var shape = new Path();
    shape.DrawRectangle(200, 50, 300, 300);

    text.Frames.Add(new ShapeTextFrame()
    {
        Shape = shape,
        TextOrientation = TextOrientation.Vertical,
    });

    text.Frames.Add(new PointTextFrame()
    {
        Point = new System.Drawing.PointF(50, 50),
        TextOrientation = TextOrientation.Vertical,
    });

    gr.DrawText(text);

    bitmap.Save("VerticalText.png");
}

Output

VerticalText.png

For AI-assisted development: Download Graphics Mill Code Samples XML Catalog