BoundedText.WrappingPaths Property

Gets the collection of paths to wrap the text around.

Namespace: Aurigma.GraphicsMill.AdvancedDrawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public virtual Collection<Path> WrappingPaths { get; }

Property Value

Paths to wrap around.

Remarks

Text will be wrapped around all paths that are in the collection.

Examples

C#
using (var bitmap = new Bitmap(300, 200, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
{
    var text = new BoundedText(@"Lorem ipsum dolor sit amet, consectetur adipiscing elit," + 
        @"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", graphics.CreateFont("Arial", 18))
    {
        Rectangle = new System.Drawing.RectangleF(20f, 20f, graphics.Width - 20, graphics.Height - 20)
    };

    var path = new Path();
    path.DrawEllipse(105, 0, 90, 200);
    graphics.FillPath(new SolidBrush(RgbColor.Moccasin), path);

    text.WrappingPaths.Add(path);

    graphics.DrawText(text);
    bitmap.Save(@"Images\Output\BoundedTextWrapping.png");
}

See Also

Reference