title: Drawing a rounded rectangle with one side rounded
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6553804/ios-draw-rectagle-with-curved-ends">iOS Draw Rectagle with curved ends</a>  </p>
  </blockquote>
  
  
  
  <p>In Objective-C (an iPhone app), how would I write a function which takes in a <code>CGRect</code> and draws a one-sided rounded rectangle. This is what a one sided rounded rectangle looks like:</p>
  
  <pre><code>ooooooooooooooo
  o               o
  o                 o
  o                o
  o               o
  ooooooooooooooo
  </code></pre>
  
  <p>That drawing is hard to see, but basically, it's like a pencil, just not as pointy at the round side. I would like to use a combination of <code>CGContext</code> methods to do this. Can someone provide this code?</p>