Re: Drawing an arc fill inside an image

2011-05-26 Thread Alex Kac
Sure, I get the idea of only optimizing if needed. That said, experience (15 years) tells me very strongly that if I know that X will be slow and Y will be fast and either way works properly, I'd probably choose Y. So I prefer to stand on the shoulders of giants where possible. I've got a workin

Re: Drawing an arc fill inside an image

2011-05-26 Thread Conrad Shultz
The OP wants a solution for iOS. lock/unlockFocus only exist in NSView, not UIView. FWIW, I think you (that is, the OP) should start with the simplest solution available (e.g. Steve's suggestion), test performance, and only optimize if needed. Don't try to optimize if it's not actually require

Re: Drawing an arc fill inside an image

2011-05-26 Thread Steve Christensen
Custom view that sits on top of a UIImageView? Implement -drawRect: and a progress property and you're done. On May 26, 2011, at 11:21 AM, Alex Kac wrote: > I'm not sure what the best way to tackle this is... so I thought I'd ask > here. I have an image with a circular button inside of it. I'd

Re: Drawing an arc fill inside an image

2011-05-26 Thread Jens Alfke
On May 26, 2011, at 11:21 AM, Alex Kac wrote: > So I have the image, and I suppose I can draw that image to a context and > then draw an arc on that image, and then make another image out of it. That > seems like it would get slow if I needed to do that a lot. No need to make a new image. Jus

Drawing an arc fill inside an image

2011-05-26 Thread Alex Kac
I'm not sure what the best way to tackle this is... so I thought I'd ask here. I have an image with a circular button inside of it. I'd like to dynamically fill this button in an arc to show "progress" much like how when you are on iTunes Store on an iOS and its playing the preview its animating