diff -r 3b8b1da2ff29 -r 12b1f4649ab1 src/Tools/GraphBrowser/graphbrowser/Spline.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Tools/GraphBrowser/graphbrowser/Spline.java Fri Jul 16 12:55:02 2021 +0200 @@ -0,0 +1,120 @@ +/*************************************************************************** + Title: graphbrowser/Spline.java + Author: Stefan Berghofer, TU Muenchen + Options: :tabSize=4: + + This class is used for drawing spline curves (which are not yet + supported by the Java AWT). +***************************************************************************/ + +package isabelle.graphbrowser; + +import java.awt.*; +import java.util.*; +import java.io.*; + +class SplineSection { + + /*** Section of a spline function ***/ + + double x_b,x_c,x_d; + double y_b,y_c,y_d; + int dx,dy; + + public SplineSection(double xb,double xc,double xd, + double yb,double yc,double yd,int dx2,int dy2) { + x_b=xb;x_c=xc;x_d=xd; + y_b=yb;y_c=yc;y_d=yd; + dx=dx2;dy=dy2; + } + + public Point draw(Graphics g,Point s) { + double m; + int s_x,s_y,e_x=0,e_y=0; + int x,y; + + s_x=s.x;s_y=s.y; + if (dx>=dy) { + if (dx==0) return s; + m=1/((double)dx); + for (x=0;x