Drawing lines with rounded corners

I am using the graphics path object to draw multiple lines, vertical and horizontal, how can I make the joins of these lines round? does the api support this?

@dileepawijay,

Could you please share your desired drawn lines (image) having round joins, we will check it soon. Also, share your current sample code that you are using to get undesired output.

we want to draw a line like this
image.png (26.1 KB)

@dileepawijay,

Thanks for the screenshot.

We will evaluate if we can implement to draw lines with rounded corners as per your attached screenshot. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DRAWINGNET-1254

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@dileepawijay,

To make the joins of these lines round, you can set myPen.LineJoin = LineJoin.Round. See the following sample code for your reference.

using Aspose.Drawing;
using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace ConsoleAppW
{
    class Program
    {
        static void Main(string[] args)
        {
            License oLic = new License();
            oLic.SetLicense("Aspose.Drawing.NET.lic");

            Bitmap oImage = new Bitmap(100, 100);
            Graphics g = Graphics.FromImage(oImage);
            g.SmoothingMode = SmoothingMode.HighQuality;
            g.Clear(Color.White);

            Pen myPen = new Pen(Brushes.Red, 12);
            myPen.LineJoin = LineJoin.Round;

            GraphicsPath oPath = new GraphicsPath();
            oPath.AddLine(new Point(10, 90), new Point(10, 10));
            oPath.AddLine(new Point(10, 10), new Point(90, 10));
            g.DrawPath(myPen, oPath);

            oImage.Save(@"dw.png");
        }
    }
}

dw.png (234 Bytes)