From 726cb77717e00de9cd6d9accad0a69f4ae7a6859 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 15 Mar 2018 16:52:27 +0000 Subject: Improve X11 coordinate clipping. Make clipping methods non-virtual so they can be inlined. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12753 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx') diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx index 1080bd360..7ba5490b5 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx @@ -188,26 +188,6 @@ int Fl_Xlib_Graphics_Driver::clip_rect(int &x, int &y, int &w, int &h) { return 0; } -/* - clip_xy() returns a single coordinate value clipped to the 16-bit - coordinate space. - - This can be used to draw horizontal and vertical lines that can be - handled by X. Each single coordinate value can be clipped individually - and the result can be used directly, e.g. in fl_xyline() and fl_yxline(). - - Note 1: this can't be used for arbitrary lines (neither horizontal nor vertical). - Note 2: may be changed since Fl_Xlib_Graphics_Driver::clip_line() exists. -*/ - -int Fl_Xlib_Graphics_Driver::clip_xy(int x) { - - if (x < clip_min()) - x = clip_min(); - else if (x > clip_max()) - x = clip_max(); - return x; -} // Missing X call: (is this the fastest way to init a 1-rectangle region?) // Windows equivalent exists, implemented inline in win32.H -- cgit v1.2.3