Possible Duplicate:
iOS Draw Rectagle with curved ends
In Objective-C (an iPhone app), how would I write a function which takes in a CGRect
and draws a one-sided rounded rectangle. This is what a one sided rounded rectangle looks like:
ooooooooooooooo
o o
o o
o o
o o
ooooooooooooooo
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 CGContext
methods to do this. Can someone provide this code?