I know Cairo supports Quartz output, but how to implement such a thing in a Cocoa application? I really have not found good examples of this in the documentation.
You can get CGContextRefout NSViewby calling [[[myView window] graphicsContext] graphicsPort]. Then you can create a Cairo context from CGContextRef.
CGContextRef
NSView
[[[myView window] graphicsContext] graphicsPort]