ftp://ftp.ntnu.no/old/pub/X11/R5contrib/xscreensaver-1.17.tar.gz
[xscreensaver] / utils / spline.h
1 #ifndef _SPLINE_H_
2 #define _SPLINE_H_
3
4 #include <X11/Xlib.h>
5
6 #if __STDC__
7 # define P(x)x
8 #else
9 # define P(x)()
10 #endif
11
12 typedef struct _spline
13 {
14   /* input */
15   u_int         n_controls;
16   double*       control_x;
17   double*       control_y;
18
19   /* output */
20   u_int         n_points;
21   XPoint*       points;
22   u_int         allocated_points;
23 } spline;
24
25 spline* make_spline P((u_int size));
26 void compute_spline P((spline* s));
27 void compute_closed_spline P((spline* s));
28 void just_fill_spline P((spline* s));
29 void append_spline_points P((spline* s1, spline* s2));
30 void spline_bounding_box P((spline* s, XRectangle* rectangle_out));
31
32 #undef P
33 #endif /* _SPLINE_H_ */