I had a problem creating a specific path for a slightly modified rectangle with a round corner. Here is the code I use to create a round rectangle:
public static System.Drawing.Drawing2D.GraphicsPath RoundedRectangle(Rectangle r, int d) { System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath(); gp.AddArc(rX, rY, d, d, 180, 90); gp.AddArc(rX + r.Width - d, rY, d, d, 270, 90); gp.AddArc(rX + r.Width - d, rY + r.Height - d, d, d, 0, 90); gp.AddArc(rX, rY + r.Height - d, d, d, 90, 90); gp.AddLine(rX, rY + r.Height - d, rX, rY + d / 2); return gp; }
Now I need to generate something like this:

What would be the best approach to achieve this? Maybe by deleting the left border, and then adding the right triangle?
Any help is appreciated, thanks!
source share