title: Delphi draw a closed rectangle with two rounded corners and to rectangular corners
body: <p>How can I draw a rectangle that has two round corners and the opposite corners are rectangular corners. The shape must be closed so it can be filled with the Brush color. The Polyline method doesn't draw curved lines. Can I add the points of an Arc to the polyline points? I tried to draw a RoundRect using Canvas method and then, overlapping a rectangle over the lower round corners, but I couldn't figure out how to erase the upper line of the rectangle when drawign just the border of the shape without filling it. Note: if you think is relevant, I can add the code I used. </p>
  
  <p>Sample of the desired shape:</p>
  
  <p><img src="https://i.stack.imgur.com/3oh4R.jpg" alt="enter image description here"></p>
  
  <p>Sample of what I got with Delphi:</p>
  
  <p><img src="https://i.stack.imgur.com/K6sUh.jpg" alt="enter image description here"></p>