summaryrefslogtreecommitdiff
path: root/src/Fl_Chart.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-19 20:46:58 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-19 20:46:58 +0000
commit1a86a0ede02de76c617165fb3555c192f0b74347 (patch)
tree4a4db772f900b3e5f5055c8f1603d91048acd3f7 /src/Fl_Chart.cxx
parent512332670a87377ba6b705232d22a67681fba3ff (diff)
The great heading change - now use standard LGPL header with CVS tags.
git-svn-id: file:///fltk/svn/fltk/trunk@19 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Chart.cxx')
-rw-r--r--src/Fl_Chart.cxx38
1 files changed, 30 insertions, 8 deletions
diff --git a/src/Fl_Chart.cxx b/src/Fl_Chart.cxx
index 54c6913f9..9d91863a6 100644
--- a/src/Fl_Chart.cxx
+++ b/src/Fl_Chart.cxx
@@ -1,9 +1,27 @@
-// Fl_Chart.C
-
-// Emulation of the Forms Chart widget.
-// I did not try to improve this much, as I doubt it is used.
-
-// display code Written by: Mark Overmars
+//
+// "$Id"
+//
+// Forms-compatible chart widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998 by Bill Spitzak and others.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems to "fltk-bugs@easysw.com".
+//
#include <FL/math.h>
#include <FL/Fl.H>
@@ -28,7 +46,7 @@ static void draw_barchart(int x,int y,int w,int h,
double incr = h/(max-min);
int zeroh;
double lh = fl_height();
- if ( -min*incr < lh) {
+ if ( (-min*incr) < lh) {
incr = (h - lh + min*incr)/(max-min);
zeroh = int(y+h-lh);
} else {
@@ -73,7 +91,7 @@ static void draw_horbarchart(int x,int y,int w,int h,
if (lw > 0.0) lw += 4.0;
double incr = w/(max-min);
int zeroh;
- if ( -min*incr < lw) {
+ if ( (-min*incr) < lw) {
incr = (w - lw + min*incr)/(max-min);
zeroh = x+int(lw+.5);
} else {
@@ -342,3 +360,7 @@ void Fl_Chart::maxsize(int m) {
redraw();
}
}
+
+//
+// End of "$Id: Fl_Chart.cxx,v 1.2 1998/10/19 20:45:40 mike Exp $".
+//