"Beveled" Shapes in Quartz 2D

Posted by Shaggy Frog on Stack Overflow See other posts from Stack Overflow or by Shaggy Frog
Published on 2010-01-25T21:37:36Z Indexed on 2010/04/17 3:03 UTC
Read the original article Hit count: 577

Filed under:
|
|
|
|

I'm familiar with some of the basics of Quartz 2D drawing, like drawing basic shapes and gradients and so on, but I'm not sure how to draw a shape with a "beveled" look, like this:

beveled circle

Essentially we've got a shine on one corner, and maybe some shading in the opposite corner. I think -- I didn't make this image, although I'd like to be able to approximate it.

Any ideas? This is on the iPhone, and I'd like to use built-in frameworks and avoid any external libraries if at all possible.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about quartz-2d