title: ASP.NET C# Graphics Path shape
body: <p>I'm having a problem generating a certain path for a slightly modified round-corner rectangle. Here is the code I am using for generating the round rectangle:</p>
  
  <pre><code>    public static System.Drawing.Drawing2D.GraphicsPath RoundedRectangle(Rectangle r, int d)
      {
  
          System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();
  
          gp.AddArc(r.X, r.Y, d, d, 180, 90);
          gp.AddArc(r.X + r.Width - d, r.Y, d, d, 270, 90);
          gp.AddArc(r.X + r.Width - d, r.Y + r.Height - d, d, d, 0, 90);
          gp.AddArc(r.X, r.Y + r.Height - d, d, d, 90, 90);
          gp.AddLine(r.X, r.Y + r.Height - d, r.X, r.Y + d / 2);
  
          return gp;
      }
  </code></pre>
  
  <p>Now I need to generate something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Vyzuj.png" alt="enter image description here"></p>
  
  <p>What would be the best approach to achieve this? Maybe by erasing the left border and then adding a right triangle somehow?</p>
  
  <p>Any help is appreciated, thanks!</p>