NTK 1.3.0
Cairo support functions and classes

Functions

static cairo_t * Fl::cairo_cc ()
 when FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true, any current window dc is linked to a current context. More...
 
static cairo_surface_t * Fl::cairo_create_surface (Window xid, int W, int H)
 
static cairo_t * Fl::cairo_make_current (cairo_t *cc)
 

Detailed Description

Function Documentation

◆ cairo_cc()

static cairo_t * Fl::cairo_cc ( )
inlinestatic

when FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true, any current window dc is linked to a current context.

This is not the default, because it may not be necessary to add cairo support to all fltk supported windows. When you wish to associate a cairo context in this mode, you need to call explicitly in your draw() overridden method, FL::cairo_make_current(Fl_Window*). This will create a cairo context but only for this Window. Still in custom cairo application it is possible to handle completely this process automatically by setting alink to true. In this last case, you don't need anymore to call Fl::cairo_make_current(). You can use Fl::cairo_cc() to get the current cairo context anytime.

Note
Only available when configure has the –enable-cairo option Gets the current cairo context linked with a fltk window.