summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-11-20 17:13:09 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-12-04 12:34:44 +0100
commit3e61ec7044942ebaeda948c64df762a0250f8954 (patch)
tree642c08a6f7b120c2237f5e457074670d0ccf3e86 /src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H
parentb9ac6bd728659a7780d7cde024f34607601e8a7f (diff)
New member function Fl_Image_Surface::mask(Fl_RGB_Image*)
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H b/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H
index ab702840d..382daf886 100644
--- a/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H
+++ b/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.H
@@ -1,7 +1,7 @@
//
// Draw-to-image code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2022 by Bill Spitzak and others.
+// Copyright 2022-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -32,8 +32,19 @@ public:
void translate(int x, int y) FL_OVERRIDE;
void untranslate() FL_OVERRIDE;
Fl_RGB_Image *image() FL_OVERRIDE;
+ void mask(const Fl_RGB_Image *) FL_OVERRIDE;
#if FLTK_USE_CAIRO
cairo_t *cairo_;
+ struct shape_data_type {
+ double scale;
+ cairo_pattern_t *mask_pattern_;
+ cairo_t *bg_cr;
+ } *shape_data_;
+#else
+ struct shape_data_type {
+ Pixmap background;
+ Fl_RGB_Image* mask;
+ } *shape_data_;
#endif
};