From d2870d6f7d378e374da515280e9434c605b1ac4e Mon Sep 17 00:00:00 2001 From: ManoloFLTK Date: Tue, 4 Dec 2018 15:11:03 +0100 Subject: Define useful implementations of Fl_Graphics_Driver::push_no_clip() and pop_clip(). --- src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H | 2 -- src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx | 16 ---------------- 2 files changed, 18 deletions(-) (limited to 'src/drivers/Xlib') diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H index f8334b74a..66b47edb0 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.H @@ -184,8 +184,6 @@ protected: void push_clip(int x, int y, int w, int h); int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H); int not_clipped(int x, int y, int w, int h); - void push_no_clip(); - void pop_clip(); void restore_clip(); void begin_complex_polygon(); void end_points(); diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx index 1af4320b6..af6b19c9a 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx @@ -396,22 +396,6 @@ int Fl_Xlib_Graphics_Driver::not_clipped(int x, int y, int w, int h) { return XRectInRegion(r, x, y, w, h); } -// make there be no clip (used by fl_begin_offscreen() only!) -void Fl_Xlib_Graphics_Driver::push_no_clip() { - if (rstackptr < region_stack_max) rstack[++rstackptr] = 0; - else Fl::warning("Fl_Xlib_Graphics_Driver::push_no_clip: clip stack overflow!\n"); - restore_clip(); -} - -// pop back to previous clip: -void Fl_Xlib_Graphics_Driver::pop_clip() { - if (rstackptr > 0) { - Fl_Region oldr = rstack[rstackptr--]; - if (oldr) XDestroyRegion(oldr); - } else Fl::warning("Fl_Xlib_Graphics_Driver::pop_clip: clip stack underflow!\n"); - restore_clip(); -} - void Fl_Xlib_Graphics_Driver::restore_clip() { fl_clip_state_number++; if (gc_) { -- cgit v1.2.3