diff options
| -rw-r--r-- | src/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/Makefile | 4 | ||||
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx | 9 | ||||
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx | 30 | ||||
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx | 16 | ||||
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx | 14 | ||||
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx | 5 | ||||
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx | 7 | ||||
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx | 7 | ||||
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx | 5 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx | 7 | ||||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx | 7 | ||||
| -rw-r--r-- | src/fl_vertex.cxx | 2 | ||||
| -rw-r--r-- | src/makedepend | 19 |
14 files changed, 39 insertions, 96 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 96e940a66..34167488c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -335,7 +335,8 @@ set (GLCPPFILES set (GL_DRIVER_FILES drivers/OpenGL/Fl_OpenGL_Display_Device.cxx - drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx + # the following file doesn't contribute any code: + # drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx diff --git a/src/Makefile b/src/Makefile index f9901bd68..3c7575981 100644 --- a/src/Makefile +++ b/src/Makefile @@ -190,7 +190,6 @@ GLCPPFILES = \ glut_compatibility.cxx \ glut_font.cxx \ drivers/OpenGL/Fl_OpenGL_Display_Device.cxx \ - drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx \ drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx \ drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx \ drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx \ @@ -199,6 +198,9 @@ GLCPPFILES = \ drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx \ drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx +# the following file currently doesn't contribute code to GLCPPFILES +# drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx + IMGCPPFILES = \ fl_images_core.cxx \ Fl_BMP_Image.cxx \ diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx index 53ea13dcd..5701b6cd9 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx @@ -3,7 +3,7 @@ // // Arc (integer) drawing functions for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2016 by Bill Spitzak and others. +// Copyright 1998-2017 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 @@ -16,9 +16,6 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_GDI_ARCI_CXX -#define FL_CFG_GFX_GDI_ARCI_CXX - /** \file Fl_GDI_Graphics_Driver_arci.cxx \brief Utility functions for drawing circles using integers @@ -61,11 +58,9 @@ void Fl_GDI_Graphics_Driver::pie_unscaled(float x, float y, float w, float h, do LineTo(gc_, xa, ya); SetPixel(gc_, xa, ya, fl_RGB()); } else Pie(gc_, x, y, x+w, y+h, xa, ya, xb, yb); - } else Pie(gc_, x, y, x+w, y+h, xa, ya, xb, yb); + } else Pie(gc_, x, y, x+w, y+h, xa, ya, xb, yb); } -#endif // FL_CFG_GFX_GDI_ARCI_CXX - // // End of "$Id$". // diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx index 63b32de43..2fd2da3e9 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx @@ -3,7 +3,7 @@ // // Line style code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2016 by Bill Spitzak and others. +// Copyright 1998-2017 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 @@ -16,21 +16,16 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_GDI_LINE_STYLE_CXX -#define FL_CFG_GFX_GDI_LINE_STYLE_CXX +/** + \file Fl_GDI_Graphics_Driver_line_style.cxx + + \brief Line style drawing utility for Windows (GDI) platform. +*/ -#include "../../config_lib.h" #include <FL/Fl.H> -#include <FL/fl_draw.H> #include <FL/x.H> +#include <FL/fl_draw.H> #include <FL/Fl_Printer.H> -#include "../../flstring.h" -#include <stdio.h> - -/** - \file Fl_GDI_Graphics_Driver_line_style.cxx - \brief Line style drawing utility hiding different platforms. -*/ #include "Fl_GDI_Graphics_Driver.H" @@ -40,10 +35,13 @@ void Fl_GDI_Graphics_Driver::line_style_unscaled(int style, float width, char* d // According to Bill, the "default" cap and join should be the // "fastest" mode supported for the platform. I don't know why // they should be different (same graphics cards, etc., right?) MRS - static DWORD Cap[4]= {PS_ENDCAP_FLAT, PS_ENDCAP_FLAT, PS_ENDCAP_ROUND, PS_ENDCAP_SQUARE}; - static DWORD Join[4]={PS_JOIN_ROUND, PS_JOIN_MITER, PS_JOIN_ROUND, PS_JOIN_BEVEL}; + + static const DWORD Cap[4] = {PS_ENDCAP_FLAT, PS_ENDCAP_FLAT, PS_ENDCAP_ROUND, PS_ENDCAP_SQUARE}; + static const DWORD Join[4] = {PS_JOIN_ROUND, PS_JOIN_MITER, PS_JOIN_ROUND, PS_JOIN_BEVEL}; + int s1 = PS_GEOMETRIC | Cap[(style>>8)&3] | Join[(style>>12)&3]; - DWORD a[16]; int n = 0; + DWORD a[16]; + int n = 0; if (dashes && dashes[0]) { s1 |= PS_USERSTYLE; for (n = 0; n < 16 && *dashes; n++) a[n] = *dashes++; @@ -65,8 +63,6 @@ void Fl_GDI_Graphics_Driver::line_style_unscaled(int style, float width, char* d fl_current_xmap->pen = newpen; } -#endif // FL_CFG_GFX_GDI_LINE_STYLE_CXX - // // End of "$Id$". // diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx index ee817bf4f..c5ab1a760 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx @@ -3,7 +3,7 @@ // // Portable drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2016 by Bill Spitzak and others. +// Copyright 1998-2017 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 @@ -16,14 +16,12 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_GDI_VERTEX_CXX -#define FL_CFG_GFX_GDI_VERTEX_CXX - /** - \file Fl_GDI_Graphics_Driver_vertex.cxx - \brief Portable drawing code for drawing arbitrary shapes with - simple 2D transformations, implemented for MSWindows GDI. - */ + \file Fl_GDI_Graphics_Driver_vertex.cxx + + \brief Portable drawing code for drawing arbitrary shapes with + simple 2D transformations, implemented for MSWindows GDI. +*/ #include "Fl_GDI_Graphics_Driver.H" @@ -104,8 +102,6 @@ void Fl_GDI_Graphics_Driver::ellipse_unscaled(double xt, double yt, double rx, d Arc(gc_, llx, lly, llx+w, lly+h, 0,0, 0,0); } -#endif // FL_CFG_GFX_GDI_VERTEX_CXX - // // End of "$Id$". // diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx index 227b50de3..5544b136e 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx @@ -3,7 +3,7 @@ // // Rectangle drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2016 by Bill Spitzak and others. +// Copyright 1998-2017 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 @@ -16,14 +16,18 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_OPENGL_CXX -#define FL_CFG_GFX_OPENGL_CXX +// Note: +// This file doesn't contribute any code to the library. +// It is kept as a placeholder for future usage. +// This file is not compiled (as of Aug 2017) +// +// Fl_OpenGL_Graphics_Driver is implemented in several files +// named Fl_OpenGL_Graphics_Driver_*.cxx. +// This may be changed in the future. #include <FL/gl.h> #include "Fl_OpenGL_Graphics_Driver.H" -#endif // FL_CFG_GFX_OPENGL_RECT_CXX - // // End of "$Id$". // diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx index 36d36ca12..c0fd58aea 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.cxx @@ -16,9 +16,6 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_OPENGL_ARCI_CXX -#define FL_CFG_GFX_OPENGL_ARCI_CXX - /** \file Fl_OpenGL_Graphics_Driver_arci.cxx \brief Utility functions for drawing circles using integers @@ -70,8 +67,6 @@ void Fl_OpenGL_Graphics_Driver::pie(int x,int y,int w,int h,double a1,double a2) glEnd(); } -#endif // FL_CFG_GFX_OPENGL_ARCI_CXX - // // End of "$Id$". // diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx index c5698bb4d..047cfba0d 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_line_style.cxx @@ -3,7 +3,7 @@ // // Line style code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2016 by Bill Spitzak and others. +// Copyright 1998-2017 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 @@ -16,9 +16,6 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_OPENGL_LINE_STYLE_CXX -#define FL_CFG_GFX_OPENGL_LINE_STYLE_CXX - /** \file Fl_OpenGL_Graphics_Driver_line_style.cxx \brief Line style drawing utility hiding different platforms. @@ -62,8 +59,6 @@ void Fl_OpenGL_Graphics_Driver::line_style(int style, int width, char* dashes) { } } -#endif // FL_CFG_GFX_OPENGL_LINE_STYLE_CXX - // // End of "$Id$". // diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx index 457b228b8..308c059f4 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_rect.cxx @@ -3,7 +3,7 @@ // // Rectangle drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2016 by Bill Spitzak and others. +// Copyright 1998-2017 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 @@ -16,9 +16,6 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_OPENGL_RECT_CXX -#define FL_CFG_GFX_OPENGL_RECT_CXX - /** \file Fl_OpenGL_Graphics_Driver_rect.cxx @@ -205,8 +202,6 @@ void Fl_OpenGL_Graphics_Driver::restore_clip() { } -#endif // FL_CFG_GFX_OPENGL_RECT_CXX - // // End of "$Id$". // diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx index cbbb68f14..894ab35c1 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx @@ -16,9 +16,6 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_OPENGL_VERTEX_CXX -#define FL_CFG_GFX_OPENGL_VERTEX_CXX - /** \file Fl_OpenGL_Graphics_Driver_vertex.cxx \brief Portable drawing code for drawing arbitrary shapes with @@ -131,8 +128,6 @@ void Fl_OpenGL_Graphics_Driver::circle(double cx, double cy, double r) { } -#endif // FL_CFG_GFX_OPENGL_VERTEX_CXX - // // End of "$Id$". // diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx index 1fe4d5a0b..43ed99d15 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx @@ -16,21 +16,16 @@ // http://www.fltk.org/str.php // -#ifndef FL_CFG_GFX_XLIB_LINE_STYLE_CXX -#define FL_CFG_GFX_XLIB_LINE_STYLE_CXX - /** \file Fl_Xlib_Graphics_Driver_line_style.cxx \brief Line style drawing utility hiding different platforms. */ -#include "../../config_lib.h" #include <FL/Fl.H> #include <FL/fl_draw.H> #include <FL/x.H> #include <FL/Fl_Printer.H> #include "../../flstring.h" -#include <stdio.h> #include "Fl_Xlib_Graphics_Driver.H" @@ -70,8 +65,6 @@ if (*dashes == 0) ndashes = 0;//against error with very small scaling if (ndashes) XSetDashes(fl_display, gc_, 0, dashes, ndashes); } -#endif // FL_CFG_GFX_XLIB_LINE_STYLE_CXX - // // End of "$Id$". // diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx index 183c78956..89da64a60 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx @@ -16,11 +16,6 @@ // http://www.fltk.org/str.php // - -#ifndef FL_CFG_GFX_XLIB_RECT_CXX -#define FL_CFG_GFX_XLIB_RECT_CXX - - /** \file Fl_Xlib_Graphics_Driver_rect.cxx \brief X11 Xlib specific line and polygon drawing with integer coordinates. @@ -411,8 +406,6 @@ void Fl_Xlib_Graphics_Driver::restore_clip() { } } -#endif // FL_CFG_GFX_XLIB_RECT_CXX - // // End of "$Id$". // diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx index dd7b7aa2e..848c30caa 100644 --- a/src/fl_vertex.cxx +++ b/src/fl_vertex.cxx @@ -49,7 +49,7 @@ void Fl_Graphics_Driver::push_matrix() { void Fl_Graphics_Driver::pop_matrix() { if (sptr==0) Fl::error("fl_pop_matrix(): matrix stack underflow."); - else + else m = stack[--sptr]; } diff --git a/src/makedepend b/src/makedepend index 5aaa6ddbe..5a315cd33 100644 --- a/src/makedepend +++ b/src/makedepend @@ -1132,7 +1132,6 @@ drivers/Xlib/Fl_Xlib_Graphics_Driver_image.o: ../FL/Fl_Image_Surface.H drivers/Xlib/Fl_Xlib_Graphics_Driver_image.o: ../FL/Fl_Widget_Surface.H drivers/Xlib/Fl_Xlib_Graphics_Driver_image.o: ../FL/Fl_Shared_Image.H drivers/Xlib/Fl_Xlib_Graphics_Driver_image.o: Fl_XColor.H flstring.h -drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: config_lib.h ../config.h drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/Fl.H drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/Fl_Export.H drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/platform_types.h @@ -1155,7 +1154,7 @@ drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/Fl_Group.H drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/Fl_Bitmap.H drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/Fl_Image.H drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/Fl_Widget.H -drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: flstring.h +drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: flstring.h ../config.h drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: drivers/Xlib/Fl_Xlib_Graphics_Driver.H drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/Fl_Graphics_Driver.H drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.o: ../FL/Fl_Image.H @@ -1768,22 +1767,6 @@ drivers/OpenGL/Fl_OpenGL_Display_Device.o: ../FL/Fl_Window_Driver.H drivers/OpenGL/Fl_OpenGL_Display_Device.o: ../FL/Fl_Window.H ../FL/Fl_Group.H drivers/OpenGL/Fl_OpenGL_Display_Device.o: ../FL/Fl_Overlay_Window.H drivers/OpenGL/Fl_OpenGL_Display_Device.o: ../FL/Fl_Double_Window.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/gl.h ../FL/Enumerations.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/abi-version.h -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Export.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/fl_types.h -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/platform_types.h -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Graphics_Driver.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Device.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Plugin.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Preferences.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Image.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Widget.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Bitmap.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Image.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_Pixmap.H -drivers/OpenGL/Fl_OpenGL_Graphics_Driver.o: ../FL/Fl_RGB_Image.H drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.o: ../config.h config_lib.h drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.o: drivers/OpenGL/Fl_OpenGL_Graphics_Driver.H drivers/OpenGL/Fl_OpenGL_Graphics_Driver_arci.o: ../FL/Fl_Graphics_Driver.H |
