CocoaContext
A cocoaContext that can draw in NSViews
Is that a question or a statement? :)
A reminder ;)
On Friday, 20 May 2016, Just van Rossum [email protected] wrote:
Is that a question or a statement? :)
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/typemytype/drawbot/issues/49#issuecomment-220647494
gr Frederik www.typemytype.com
hi! the issue is still open, so... should I assume that it is not possible yet?
Btw. DB's PDFContext should be almost capable of this: we just need it to supply an explicit CGContext via NSGraphicsContext.currentContext().CGContext(). The internal _pdfContext attribute should be renamed _cgContext. There's very little PDF-specific code there.
yeah, I tried that, this is working, but the overhead of drawBot was to much to use this as drawing tool in drawRect_ of a NSView...
But then the description of this issue is inadequate, because it only mentions "can" and not "can super fast" :)
Funnily enough I tried to use this to directly draw into a CG bitmap context, and to save that to PNG. That turned out to be slower than to just use the existing DB method (build the PDF data, render that to an NSImage and save that as PNG).