summaryrefslogtreecommitdiff
path: root/src/drivers/GDI
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2017-08-14 17:10:26 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2017-08-14 17:10:26 +0000
commitec951ce695d52cfa3be92535f88324f019266e20 (patch)
treea67aeb89427e04dc52954ad4cb2d0c075db293cd /src/drivers/GDI
parent4198caa780ed814113b66f97a46266ef72e8f455 (diff)
Remove unnecessary #include statements and compilation guards.
Currently src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver.cxx wouldn't contribute any code to the lib, but it is kept for future extensions. This file is no longer compiled (see src/CMakeLists.txt and src/Makefile). Tested (only) under Windows and Linux. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12381 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx9
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_line_style.cxx30
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx16
3 files changed, 21 insertions, 34 deletions
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$".
//