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 void	redisplay_canvas(void);
19 extern Boolean	request_redraw;		/* set in redisplay_region if called when
20 					   preview_in_progress is true */
21 extern void	clearcounts(void);		/* clear object counters for each depth */
22 extern void	clearallcounts(void);	/* clear all object counters for each depth */
23 
24 /*
25  * Support for rendering based on correct object depth.	 A simple depth based
26  * caching scheme; anything more will require major surgery on the object
27  * data structures that will percolate throughout program.
28  *
29  * One ``counts'' structure for each object type at each nesting depth from 0
30  * to MAX_DEPTH - 1.  We track both the number of objects per type per depth,
31  * as well as the number of objects drawn so far per type per depth to cut
32  * down on search loop overhead.
33  */
34 
35 struct counts {
36     unsigned	    num_arcs;		/* # arcs at this depth */
37     unsigned	    num_lines;		/* # lines at this depth */
38     unsigned	    num_ellipses;	/* # ellipses at this depth */
39     unsigned	    num_splines;	/* # splines at this depth */
40     unsigned	    num_texts;		/* # texts at this depth */
41     unsigned	    cnt_arcs;		/* count of arcs drawn at this depth */
42     unsigned	    cnt_lines;		/* count of lines drawn at this depth */
43     unsigned	    cnt_ellipses;	/* count of ellipses drawn at this
44 					 * depth */
45     unsigned	    cnt_splines;	/* count of splines drawn at this depth */
46     unsigned	    cnt_texts;		/* count of texts drawn at this depth */
47 };
48 
49 extern struct counts	counts[], saved_counts[];
50 extern void redisplay_arc (F_arc *a);
51 extern void redisplay_arcs (F_arc *a1, F_arc *a2);
52 extern void redisplay_compound (F_compound *c);
53 extern void redisplay_compoundobject (F_compound *compounds, int depth);
54 extern void redisplay_compounds (F_compound *c1, F_compound *c2);
55 extern void redisplay_ellipse (F_ellipse *e);
56 extern void redisplay_ellipses (F_ellipse *e1, F_ellipse *e2);
57 extern void redisplay_line (F_line *l);
58 extern void redisplay_lines (F_line *l1, F_line *l2);
59 extern void redisplay_objects (F_compound *active_objects);
60 extern void redisplay_pageborder (void);
61 extern void redisplay_spline (F_spline *s);
62 extern void redisplay_splines (F_spline *s1, F_spline *s2);
63 extern void redisplay_text (F_text *t);
64 extern void redisplay_texts (F_text *t1, F_text *t2);
65 extern void redisplay_zoomed_region (int xmin, int ymin, int xmax, int ymax);
66 extern void update_pageborder (void);
67 
68 extern void redisplay_region (int xmin, int ymin, int xmax, int ymax);
69 extern void redisplay_regions (int xmin1, int ymin1, int xmax1, int ymax1, int xmin2, int ymin2, int xmax2, int ymax2);
70