Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various issues #2

Open
iosdeveloper opened this issue Aug 6, 2011 · 4 comments
Open

Various issues #2

iosdeveloper opened this issue Aug 6, 2011 · 4 comments

Comments

@iosdeveloper
Copy link

From CocoaControls.com:

Awesome work. I'd love to see a metal gradient knob (rendered in Core Graphics), but I just don't know if that's even possible.

Looking very nice. Is it just me or is the on/off text too far down by 1 pixel?

@grgcombs
Copy link

grgcombs commented Aug 7, 2011

Yep, that was my comment ;-) Looking a little deeper into it, I've found one Core Graphics gradient that looks ok for metal knobs, but to do it right we need some means of creating a conical/angle gradient, which isn't easy. From the sounds of it, it takes a good deal of math to get it, and the chances are it'll draw slow as hell on mobile hardware. I'm still trying to find a workable alternative, or even just a proof of concept, but I didn't take calculus, so I'm probably screwed.

@grgcombs
Copy link

grgcombs commented Aug 7, 2011

Here's the discussion about the gradient on stackoverflow, with code from Rob Napier.

http://stackoverflow.com/questions/6905466/cgcontextdrawanglegradient/6907597#6907597

@domesticcatsoftware
Copy link
Owner

Ah that looks interesting.. I might throw it in and see what the performance is like. I had to do a lot of workarounds to get this thing performing OK in scrolling lists etc. so I'll see how it works. I think it might actually be OK since the thing is static unless the switch mechanism is actually moving.

@grgcombs
Copy link

grgcombs commented Aug 8, 2011

Don't know if it would do any better as a kernel filter in Core Image, but I'll see if I can get it working as a proof at some point. I'm still trying to find something that could do a conical/angle gradient in iOS, but so far I'm having no luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants