|
|
Under macOS, you should be good with this:
#include <FL/platform.H> #if defined(__APPLE__) && !defined(FLTK_USE_X11)
# include <ApplicationServices/ApplicationServices.h> # include <cairo-quartz.h>
CGContextRef gc = fl_mac_gc(); int W = CGBitmapContextGetWidth(gc); int H = CGBitmapContextGetHeight(gc); cairo_surface_t *cairo_surface = cairo_quartz_surface_create_for_cg_context(gc, W, H); cairo_t *cairo_context = cairo_create(cairo_surface); cairo_surface_destroy(cairo_surface); return cairo_context; #endif
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/1d2f809f-f1c0-456d-876d-49b889fd07ffn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |