23 # ifdef FLTK_HAVE_CAIRO 28 # include <FL/Fl_Export.H> 46 Fl_Cairo_State() : cc_(0), own_cc_(
false), autolink_(
false), window_(0), gc_(0) {}
49 cairo_t*
cc()
const {
return cc_;}
59 void cc(cairo_t* c,
bool own=
true) {
60 if (cc_ && own_cc_) cairo_destroy(cc_);
65 void autolink(
bool b);
67 void*
window()
const {
return window_;}
68 void gc(
void* c) {gc_=c;}
69 void*
gc()
const {
return gc_;}
81 # endif // FLTK_HAVE_CAIRO void window(void *w)
Sets the window w to keep track on.
Definition: Fl_Cairo.H:66
bool autolink() const
Gets the autolink option. See Fl::cairo_autolink_context(bool)
Definition: Fl_Cairo.H:50
cairo_t * cc() const
Gets the current cairo context.
Definition: Fl_Cairo.H:49
void * gc() const
Gets the last gc attached to a cc.
Definition: Fl_Cairo.H:69
void gc(void *c)
Sets the gc c to keep track on.
Definition: Fl_Cairo.H:68
void cc(cairo_t *c, bool own=true)
Sets the current cairo context.
Definition: Fl_Cairo.H:59
void * window() const
Gets the last window attached to a cc.
Definition: Fl_Cairo.H:67
Contains all the necessary info on the current cairo context.
Definition: Fl_Cairo.H:44