1 /* 2 * FIG : Facility for Interactive Generation of figures 3 * Copyright (c) 1985-1988 by Supoj Sutanthavibul 4 * Parts Copyright (c) 1989-2007 by Brian V. Smith 5 * Parts Copyright (c) 1991 by Paul King 6 * 7 * Any party obtaining a copy of these files is granted, free of charge, a 8 * full and unrestricted irrevocable, world-wide, paid up, royalty-free, 9 * nonexclusive right and license to deal in this software and documentation 10 * files (the "Software"), including without limitation the rights to use, 11 * copy, modify, merge, publish, distribute, sublicense and/or sell copies of 12 * the Software, and to permit persons who receive copies from any such 13 * party to do so, with the only requirement being that the above copyright 14 * and this permission notice remain intact. 15 * 16 */ 17 18 extern double compute_angle(double dx, double dy); /* compute the angle between 0 to 2PI */ 19 extern int close_to_arc (F_arc *a, int xp, int yp, int d, float *px, float *py); 20 extern int close_to_ellipse (F_ellipse *e, int xp, int yp, int d, float *ex, float *ey, float *vx, float *vy); 21 extern int close_to_polyline (F_line *l, int xp, int yp, int d, int sd, int *px, int *py, int *lx1, int *ly1, int *lx2, int *ly2); 22 extern int close_to_spline (F_spline *spline, int xp, int yp, int d, int *px, int *py, int *lx1, int *ly1, int *lx2, int *ly2); 23 extern int close_to_vector (int x1, int y1, int x2, int y2, int xp, int yp, int d, float dd, int *px, int *py); 24 extern int compute_3p_angle (F_point *p1, F_point *p2, F_point *p3, double *alpha); 25 extern int compute_arc_angle (F_arc *a, double *alpha); 26 extern int compute_arc_area (F_arc *a, float *ap); 27 extern int compute_arc_length (F_arc *a, float *lp); 28 extern int compute_arccenter (F_pos p1, F_pos p2, F_pos p3, float *x, float *y); 29 extern int compute_arcradius (int x1, int y1, int x2, int y2, int x3, int y3, float *r); 30 extern int compute_direction (F_pos p1, F_pos p2, F_pos p3); 31 extern int compute_ellipse_area (F_ellipse *e, float *ap); 32 extern int compute_line_angle (F_line *l, F_point *p, double *alpha); 33 extern void compute_normal (float x1, float y1, int x2, int y2, int direction, int *x, int *y); 34 extern int compute_poly_length (F_line *l, float *lp); 35 extern void latex_endpoint (int x1, int y1, int x2, int y2, int *xout, int *yout, int arrow, int magnet); 36 extern void compute_poly_area (F_line *l, float *ap); 37 38