From 868ab9696fb51628afac1ea10f7df6a27907a089 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 14 Feb 2023 11:52:21 +0100 Subject: Rename class Fl_Display_Cairo_Graphics_Driver to Fl_X11_Cairo_Graphics_Driver --- src/CMakeLists.txt | 10 ++-- src/Fl_Device.cxx | 8 +-- src/Fl_x.cxx | 2 +- src/Makefile | 6 +- .../Cairo/Fl_Display_Cairo_Graphics_Driver.H | 37 ------------- .../Cairo/Fl_Display_Cairo_Graphics_Driver.cxx | 64 ---------------------- src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.H | 37 +++++++++++++ src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx | 64 ++++++++++++++++++++++ src/drivers/Wayland/fl_wayland_platform_init.cxx | 6 +- src/drivers/X11/Fl_X11_Window_Driver.cxx | 8 +-- src/drivers/X11/fl_X11_platform_init.cxx | 6 +- src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx | 10 ++-- src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx | 10 ++-- 13 files changed, 134 insertions(+), 134 deletions(-) delete mode 100644 src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H delete mode 100644 src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx create mode 100644 src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.H create mode 100644 src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index daa66c23d..56d3467d6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ # # CMakeLists.txt to build the FLTK library using CMake (www.cmake.org) # -# Copyright 1998-2022 by Bill Spitzak and others. +# Copyright 1998-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 @@ -226,7 +226,7 @@ if (FLTK_USE_X11 AND NOT OPTION_USE_WAYLAND) if (FLTK_USE_CAIRO) set (DRIVER_FILES ${DRIVER_FILES} drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx - drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx + drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx ) else () if (USE_XFT) @@ -265,7 +265,7 @@ if (FLTK_USE_X11 AND NOT OPTION_USE_WAYLAND) if (FLTK_USE_CAIRO) set (DRIVER_HEADER_FILES ${DRIVER_HEADER_FILES} drivers/Cairo/Fl_Cairo_Graphics_Driver.H - drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H + drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.H ) elseif (USE_PANGO) set (DRIVER_HEADER_FILES ${DRIVER_HEADER_FILES} @@ -297,7 +297,7 @@ elseif (OPTION_USE_WAYLAND) endif (OPTION_USE_KDIALOG) if (FLTK_USE_X11) list (APPEND DRIVER_FILES - drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx + drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx drivers/X11/Fl_X11_Screen_Driver.cxx drivers/X11/Fl_X11_Window_Driver.cxx drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx @@ -313,7 +313,7 @@ elseif (OPTION_USE_WAYLAND) drivers/Wayland/Fl_Wayland_Window_Driver.H drivers/Wayland/Fl_Wayland_Graphics_Driver.H drivers/Cairo/Fl_Cairo_Graphics_Driver.H - drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H + drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.H drivers/Wayland/Fl_Wayland_Copy_Surface_Driver.H drivers/Wayland/Fl_Wayland_Image_Surface_Driver.H drivers/Unix/Fl_Unix_System_Driver.H diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx index dd24d97bf..a6f9173a7 100644 --- a/src/Fl_Device.cxx +++ b/src/Fl_Device.cxx @@ -1,7 +1,7 @@ // // implementation of classes Fl_Surface_Device and Fl_Display_Device for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2022 by Bill Spitzak and others. +// Copyright 2010-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 @@ -57,11 +57,11 @@ +- Fl_Xlib_Graphics_Driver: X11-specific graphics driver +- Fl_GDI_Graphics_Driver: Windows-specific graphics driver +- Fl_GDI_Printer_Graphics_Driver: re-implements a few member functions especially for output to printer - +- Fl_Cairo_Graphics_Driver: for X11+Pango (PostScript) and Wayland platforms + +- Fl_Cairo_Graphics_Driver: full FLTK drawing API based on Cairo and Pango +- Fl_Wayland_Graphics_Driver: Wayland-specific graphics driver - +- Fl_Display_Cairo_Graphics_Driver: used by X11 leg of hybrid Wayland/X11 platform + +- Fl_X11_Cairo_Graphics_Driver: used by X11 leg of hybrid Wayland/X11 platform +- Fl_PostScript_Graphics_Driver: for PostScript drawing with X11+Pango platform - +- Fl_OpenGL_Graphics_Driver: draw to an Fl_Gl_Window (only partial implementation) + +- Fl_OpenGL_Graphics_Driver: draw to an Fl_Gl_Window */ diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 0a8f80d50..67f9df744 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -42,7 +42,7 @@ # include "drivers/X11/Fl_X11_Window_Driver.H" # include "drivers/Unix/Fl_Unix_System_Driver.H" #if FLTK_USE_CAIRO -# include "drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H" +# include "drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.H" #else # include "drivers/Xlib/Fl_Xlib_Graphics_Driver.H" #endif diff --git a/src/Makefile b/src/Makefile index f491ce2d8..cbf9d51e4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,7 +1,7 @@ # # Library Makefile for the Fast Light Tool Kit (FLTK). # -# Copyright 1998-2022 by Bill Spitzak and others. +# Copyright 1998-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 @@ -287,7 +287,7 @@ XLIBCPPFILES = \ # These graphics driver files are used under condition: BUILD_CAIRO CAIROGDFILES = \ drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx \ - drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx + drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx # These graphics driver files are used under condition: BUILD_X11 AND BUILD_XFT XLIBGDFILES = drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx \ @@ -320,7 +320,7 @@ WLCPPFILES = \ WLX11CPPFILES = \ drivers/X11/Fl_X11_Screen_Driver.cxx \ drivers/X11/Fl_X11_Window_Driver.cxx \ - drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx \ + drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx \ drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx \ drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx \ Fl_x.cxx \ diff --git a/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H b/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H deleted file mode 100644 index 7c514b1cf..000000000 --- a/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H +++ /dev/null @@ -1,37 +0,0 @@ -// -// Support for using Cairo to draw into X11 windows for the Fast Light Tool Kit (FLTK). -// -// Copyright 2022 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 -// file is missing or damaged, see the license at: -// -// https://www.fltk.org/COPYING.php -// -// Please see the following page on how to report bugs and issues: -// -// https://www.fltk.org/bugs.php -// - -/* \file - Declaration of class Fl_Display_Cairo_Graphics_Driver. -*/ - -#ifndef FL_DISPLAY_CAIRO_GRAPHICS_DRIVER_H -# define FL_DISPLAY_CAIRO_GRAPHICS_DRIVER_H - -#include "Fl_Cairo_Graphics_Driver.H" - -class Fl_Display_Cairo_Graphics_Driver : public Fl_Cairo_Graphics_Driver { -private: - static void *gc_; -public: - void scale(float f) FL_OVERRIDE; - float scale() {return Fl_Graphics_Driver::scale();} - void gc(void *value) FL_OVERRIDE; - void* gc() FL_OVERRIDE; - void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) FL_OVERRIDE; - }; - -#endif // FL_DISPLAY_CAIRO_GRAPHICS_DRIVER_H diff --git a/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx deleted file mode 100644 index 02df902d8..000000000 --- a/src/drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx +++ /dev/null @@ -1,64 +0,0 @@ -// -// Support for using Cairo to draw into X11 windows for the Fast Light Tool Kit (FLTK). -// -// Copyright 2022 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 -// file is missing or damaged, see the license at: -// -// https://www.fltk.org/COPYING.php -// -// Please see the following page on how to report bugs and issues: -// -// https://www.fltk.org/bugs.php -// - -/* \file - Implementation of class Fl_Display_Cairo_Graphics_Driver . -*/ - -#include "Fl_Display_Cairo_Graphics_Driver.H" -#include -#include -#include -#include - - -void *Fl_Display_Cairo_Graphics_Driver::gc_ = NULL; -GC fl_gc; - - -ulong fl_xpixel(uchar r,uchar g,uchar b) { - return 0; -} -ulong fl_xpixel(Fl_Color i) { - return 0; -} - - -void Fl_Display_Cairo_Graphics_Driver::scale(float f) { - Fl_Graphics_Driver::scale(f); - if (cairo_) { - cairo_restore(cairo_); - cairo_save(cairo_); - cairo_scale(cairo_, f, f); - cairo_translate(cairo_, 0.5, 0.5); - } -} - - -void Fl_Display_Cairo_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) { - XCopyArea(fl_display, pixmap, fl_window, (GC)Fl_Graphics_Driver::default_driver().gc(), int(srcx*scale()), int(srcy*scale()), int(w*scale()), int(h*scale()), int(x*scale()), int(y*scale())); -} - - -void Fl_Display_Cairo_Graphics_Driver::gc(void *value) { - gc_ = value; - fl_gc = (GC)gc_; -} - - -void *Fl_Display_Cairo_Graphics_Driver::gc() { - return gc_; -} diff --git a/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.H b/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.H new file mode 100644 index 000000000..3ac7ca88a --- /dev/null +++ b/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.H @@ -0,0 +1,37 @@ +// +// Support for using Cairo to draw into X11 windows for the Fast Light Tool Kit (FLTK). +// +// 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 +// file is missing or damaged, see the license at: +// +// https://www.fltk.org/COPYING.php +// +// Please see the following page on how to report bugs and issues: +// +// https://www.fltk.org/bugs.php +// + +/* \file + Declaration of class Fl_X11_Cairo_Graphics_Driver. +*/ + +#ifndef FL_DISPLAY_CAIRO_GRAPHICS_DRIVER_H +# define FL_DISPLAY_CAIRO_GRAPHICS_DRIVER_H + +#include "Fl_Cairo_Graphics_Driver.H" + +class Fl_X11_Cairo_Graphics_Driver : public Fl_Cairo_Graphics_Driver { +private: + static void *gc_; +public: + void scale(float f) FL_OVERRIDE; + float scale() {return Fl_Graphics_Driver::scale();} + void gc(void *value) FL_OVERRIDE; + void* gc() FL_OVERRIDE; + void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) FL_OVERRIDE; + }; + +#endif // FL_DISPLAY_CAIRO_GRAPHICS_DRIVER_H diff --git a/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx new file mode 100644 index 000000000..d673c3dfa --- /dev/null +++ b/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx @@ -0,0 +1,64 @@ +// +// Support for using Cairo to draw into X11 windows for the Fast Light Tool Kit (FLTK). +// +// 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 +// file is missing or damaged, see the license at: +// +// https://www.fltk.org/COPYING.php +// +// Please see the following page on how to report bugs and issues: +// +// https://www.fltk.org/bugs.php +// + +/* \file + Implementation of class Fl_X11_Cairo_Graphics_Driver. +*/ + +#include "Fl_X11_Cairo_Graphics_Driver.H" +#include +#include +#include +#include + + +void *Fl_X11_Cairo_Graphics_Driver::gc_ = NULL; +GC fl_gc; + + +ulong fl_xpixel(uchar r,uchar g,uchar b) { + return 0; +} +ulong fl_xpixel(Fl_Color i) { + return 0; +} + + +void Fl_X11_Cairo_Graphics_Driver::scale(float f) { + Fl_Graphics_Driver::scale(f); + if (cairo_) { + cairo_restore(cairo_); + cairo_save(cairo_); + cairo_scale(cairo_, f, f); + cairo_translate(cairo_, 0.5, 0.5); + } +} + + +void Fl_X11_Cairo_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) { + XCopyArea(fl_display, pixmap, fl_window, (GC)Fl_Graphics_Driver::default_driver().gc(), int(srcx*scale()), int(srcy*scale()), int(w*scale()), int(h*scale()), int(x*scale()), int(y*scale())); +} + + +void Fl_X11_Cairo_Graphics_Driver::gc(void *value) { + gc_ = value; + fl_gc = (GC)gc_; +} + + +void *Fl_X11_Cairo_Graphics_Driver::gc() { + return gc_; +} diff --git a/src/drivers/Wayland/fl_wayland_platform_init.cxx b/src/drivers/Wayland/fl_wayland_platform_init.cxx index 5154e6232..9b6be2878 100644 --- a/src/drivers/Wayland/fl_wayland_platform_init.cxx +++ b/src/drivers/Wayland/fl_wayland_platform_init.cxx @@ -1,7 +1,7 @@ // // Wayland-specific code to initialize wayland support. // -// 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 @@ -24,7 +24,7 @@ #ifdef FLTK_USE_X11 # include "../Xlib/Fl_Xlib_Copy_Surface_Driver.H" # include -# include "../Cairo/Fl_Display_Cairo_Graphics_Driver.H" +# include "../Cairo/Fl_X11_Cairo_Graphics_Driver.H" # include "../X11/Fl_X11_Screen_Driver.H" # include "../X11/Fl_X11_Window_Driver.H" # include "../Xlib/Fl_Xlib_Image_Surface_Driver.H" @@ -119,7 +119,7 @@ Fl_System_Driver *Fl_System_Driver::newSystemDriver() { Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() { #ifdef FLTK_USE_X11 - if (!attempt_wayland()) return new Fl_Display_Cairo_Graphics_Driver(); + if (!attempt_wayland()) return new Fl_X11_Cairo_Graphics_Driver(); #endif return new Fl_Wayland_Graphics_Driver(); } diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx index 531886f7a..7285bc152 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx @@ -20,7 +20,7 @@ #include "Fl_X11_Screen_Driver.H" #if FLTK_USE_CAIRO # include -# include "../Cairo/Fl_Display_Cairo_Graphics_Driver.H" +# include "../Cairo/Fl_X11_Cairo_Graphics_Driver.H" #else # include "../Xlib/Fl_Xlib_Graphics_Driver.H" #endif // FLTK_USE_CAIRO @@ -173,7 +173,7 @@ void Fl_X11_Window_Driver::flush_double(int erase_overlay) pWindow->clear_damage(FL_DAMAGE_ALL); } #if FLTK_USE_CAIRO - ((Fl_Display_Cairo_Graphics_Driver*)fl_graphics_driver)->set_cairo(cairo_); + ((Fl_X11_Cairo_Graphics_Driver*)fl_graphics_driver)->set_cairo(cairo_); #endif if (pWindow->damage() & ~FL_DAMAGE_EXPOSE) { fl_clip_region(i->region); i->region = 0; @@ -205,7 +205,7 @@ void Fl_X11_Window_Driver::flush_overlay() cairo_t *overlay_cairo = cairo_create(s); cairo_surface_destroy(s); cairo_save(overlay_cairo); - ((Fl_Display_Cairo_Graphics_Driver*)fl_graphics_driver)->set_cairo(overlay_cairo); + ((Fl_X11_Cairo_Graphics_Driver*)fl_graphics_driver)->set_cairo(overlay_cairo); #endif pWindow->as_overlay_window()->draw_overlay(); #if FLTK_USE_CAIRO @@ -418,7 +418,7 @@ void Fl_X11_Window_Driver::make_current() { cairo_surface_destroy(s); cairo_save(cairo_); } - ((Fl_Display_Cairo_Graphics_Driver*)fl_graphics_driver)->set_cairo(cairo_); + ((Fl_X11_Cairo_Graphics_Driver*)fl_graphics_driver)->set_cairo(cairo_); } fl_graphics_driver->scale(scale); #elif USE_XFT diff --git a/src/drivers/X11/fl_X11_platform_init.cxx b/src/drivers/X11/fl_X11_platform_init.cxx index 1388beefd..477978b97 100644 --- a/src/drivers/X11/fl_X11_platform_init.cxx +++ b/src/drivers/X11/fl_X11_platform_init.cxx @@ -1,7 +1,7 @@ // // X11-specific code to initialize wayland support. // -// 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 @@ -18,7 +18,7 @@ #include #include "../Xlib/Fl_Xlib_Copy_Surface_Driver.H" #if FLTK_USE_CAIRO -# include "../Cairo/Fl_Display_Cairo_Graphics_Driver.H" +# include "../Cairo/Fl_X11_Cairo_Graphics_Driver.H" #else # include "../Xlib/Fl_Xlib_Graphics_Driver.H" #endif @@ -133,7 +133,7 @@ FL_EXPORT Fl_Fontdesc* fl_fonts = (Fl_Fontdesc*)built_in_table; Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver() { #if FLTK_USE_CAIRO - return new Fl_Display_Cairo_Graphics_Driver(); + return new Fl_X11_Cairo_Graphics_Driver(); #else return new Fl_Xlib_Graphics_Driver(); #endif diff --git a/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx index e4bbe29ef..014314def 100644 --- a/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx @@ -1,7 +1,7 @@ // // Copy-to-clipboard code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2018 by Bill Spitzak and others. +// Copyright 1998-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 @@ -22,7 +22,7 @@ #include "../X11/Fl_X11_Screen_Driver.H" #if FLTK_USE_CAIRO # include -# include "../Cairo/Fl_Display_Cairo_Graphics_Driver.H" +# include "../Cairo/Fl_X11_Cairo_Graphics_Driver.H" # include #else # include "Fl_Xlib_Graphics_Driver.H" @@ -32,7 +32,7 @@ Fl_Xlib_Copy_Surface_Driver::Fl_Xlib_Copy_Surface_Driver(int w, int h) : Fl_Copy_Surface_Driver(w, h) { #if FLTK_USE_CAIRO - driver(new Fl_Display_Cairo_Graphics_Driver()); + driver(new Fl_X11_Cairo_Graphics_Driver()); #else driver(new Fl_Xlib_Graphics_Driver()); #endif @@ -46,7 +46,7 @@ Fl_Xlib_Copy_Surface_Driver::Fl_Xlib_Copy_Surface_Driver(int w, int h) : Fl_Copy cairo_surface_destroy(surf); cairo_scale(cairo_, 1/s, 1/s); cairo_save(cairo_); - ((Fl_Display_Cairo_Graphics_Driver*)driver())->set_cairo(cairo_); + ((Fl_X11_Cairo_Graphics_Driver*)driver())->set_cairo(cairo_); #endif driver()->push_no_clip(); fl_window = xid; @@ -78,7 +78,7 @@ void Fl_Xlib_Copy_Surface_Driver::set_current() { oldwindow = fl_window; fl_window = xid; #if FLTK_USE_CAIRO - ((Fl_Display_Cairo_Graphics_Driver*)driver())->set_cairo(cairo_); + ((Fl_X11_Cairo_Graphics_Driver*)driver())->set_cairo(cairo_); #endif } diff --git a/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx index 240ced649..bcaf7d46a 100644 --- a/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx @@ -1,7 +1,7 @@ // // Draw-to-image code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2018 by Bill Spitzak and others. +// Copyright 1998-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 @@ -19,7 +19,7 @@ #include "../../Fl_Screen_Driver.H" #if FLTK_USE_CAIRO # include -# include "../Cairo/Fl_Display_Cairo_Graphics_Driver.H" +# include "../Cairo/Fl_X11_Cairo_Graphics_Driver.H" #else # include "Fl_Xlib_Graphics_Driver.H" #endif // FLTK_USE_CAIRO @@ -38,12 +38,12 @@ Fl_Xlib_Image_Surface_Driver::Fl_Xlib_Image_Surface_Driver(int w, int h, int hig offscreen = (Fl_Offscreen)XCreatePixmap(fl_display, RootWindow(fl_display, fl_screen), w, h, fl_visual->depth); } #if FLTK_USE_CAIRO - driver(new Fl_Display_Cairo_Graphics_Driver()); + driver(new Fl_X11_Cairo_Graphics_Driver()); cairo_surface_t *s = cairo_xlib_surface_create(fl_display, offscreen, fl_visual->visual, w, h); cairo_ = cairo_create(s); cairo_surface_destroy(s); cairo_save(cairo_); - ((Fl_Display_Cairo_Graphics_Driver*)driver())->set_cairo(cairo_); + ((Fl_X11_Cairo_Graphics_Driver*)driver())->set_cairo(cairo_); #else driver(new Fl_Xlib_Graphics_Driver()); #endif @@ -63,7 +63,7 @@ void Fl_Xlib_Image_Surface_Driver::set_current() { pre_window = fl_window; fl_window = offscreen; #if FLTK_USE_CAIRO - ((Fl_Display_Cairo_Graphics_Driver*)driver())->set_cairo(cairo_); + ((Fl_X11_Cairo_Graphics_Driver*)driver())->set_cairo(cairo_); #endif } -- cgit v1.2.3