Image:CocoaNav icon.png

PARMANOIR

Oval radial gradients

Radial gradients are filled by moving a circle along a line, while changing its color. They look nice but a bit too 'circly' for my tastes, and I couldn't figure out how to squash them. Turns out it's really simple !, as the points you use to define them obey the same rules as any other primitive : they're transformed by the view matrix. Use CGContextScaleCTM(context, 1, someSquashValue) then draw as usual with CGContextDrawRadialGradient.

Image:Radial gradients.png

This will squash your gradient's circle and its height, so you'll need to compensate CGContextDrawRadialGradient's startCenter and endCenter. Once there, you can draw a really nice radial background.

2008 07 026Less bugs through compiler optimizations
2008 06 251CocoaNav JS, a light CocoaNav for Safari
2008 06 23NSWindow goodies : bottomCornerRounded, usesLightBottomGradient
2008 06 222Inspecting NSUndoManager's undo stack
2008 06 16Cocoa Regular Expressions via JavascriptCore
2008 06 15Crossing the WebKit bridge
2008 06 08Double and Triple Click
2008 06 05Photoshop-like compositing with Core Animation
2008 06 052One way binding to NSSlider
2008 05 30Threaded Core Animation, Part Deux
2008 05 281A 2D Bevel Technique
2008 05 264Zero Opacity Trick
2008 05 244Sorry NNW readers
2008 05 23What's IB connecting to when you connect to First Responder ?
2008 05 22Lanczos Scaling seems to handle Gamma well
2008 05 21Core Animation Phantom Fade
2008 05 21CocoaNav 1.01
2008 05 202Introducing CocoaNav, a Cocoa Class Browser
2008 05 182Exposing everything to WebKit
2008 05 14Projected coordinates of a 3D CALayer

Powered by MediaWiki

Hi ! I'm learning Cocoa to (hopefully !) become an indie developer.

I've written software all my professional life, in C++, PHP, Javascript. I've designed websites and web interfaces. My last venture went into flames as clients were happy but didn't like paying very much.

I've had little luck in the B2B world, I'm hoping for a better future writing Mac applications.

Image:rss.png Feed

Planet Cocoa