Getting a CGContextRef


I'm trying to integrate a third-party library with JUCE and it requires a CGContextRef to do the painting. 
What is the proper way of obtaining and working with a CGContextRef in JUCE ?

Thank you

The only really safe way to embed some alien drawing code would be in a NSView, using NSViewComponent

Thank you jules.