Getting window handle from LowLevelGraphicsContext

gui

#1

Hi guys, I want to implement cairo graphics inside JUCE since I have a lot of code already written for it, also I need some advanced cairo stuff. So in order to use cairo I have couple of choices:

  1. Create image buffer,create graphics context from image buffer and attach cairo to image buffer (I need access to memory of the image, unsigned char*)
  2. Create graphics context and attach cairo directly to that. So on windows I need to get DC and on mac I need CGContext.
  3. Create openGL context and attach cairo to that. So on windows I need to target WGL and on mac I need GLX.

Now, I know how to attach cairo to that, but I don’t know how to create that kind of context in JUCE and I don’t know how to get raw memory buffer from image or how to get handles. Thanks for any help!