Commit | Line | Data |
---|---|---|
e79d4cdd WJ |
1 | // -*- C++ -*- |
2 | /* Copyright (C) 1989, 1990 Free Software Foundation, Inc. | |
3 | Written by James Clark (jjc@jclark.uucp) | |
4 | ||
5 | This file is part of groff. | |
6 | ||
7 | groff is free software; you can redistribute it and/or modify it under | |
8 | the terms of the GNU General Public License as published by the Free | |
9 | Software Foundation; either version 1, or (at your option) any later | |
10 | version. | |
11 | ||
12 | groff is distributed in the hope that it will be useful, but WITHOUT ANY | |
13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 | for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License along | |
18 | with groff; see the file LICENSE. If not, write to the Free Software | |
19 | Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
20 | ||
21 | class common_output : public output { | |
22 | private: | |
23 | void dash_line(const position &start, const position &end, | |
24 | const line_type <, double dash_width, double gap_width, | |
25 | double *offsetp); | |
26 | void dash_arc(const position ¢, double rad, | |
27 | double start_angle, double end_angle, const line_type <, | |
28 | double dash_width, double gap_width, double *offsetp); | |
29 | void dot_line(const position &start, const position &end, | |
30 | const line_type <, double gap_width, double *offsetp); | |
31 | void dot_arc(const position ¢, double rad, | |
32 | double start_angle, double end_angle, const line_type <, | |
33 | double gap_width, double *offsetp); | |
34 | protected: | |
35 | virtual void dot(const position &, const line_type &) = 0; | |
36 | void dashed_circle(const position &, double rad, const line_type &); | |
37 | void dotted_circle(const position &, double rad, const line_type &); | |
38 | void dashed_arc(const position &, const position &, const position &, | |
39 | const line_type &); | |
40 | void dotted_arc(const position &, const position &, const position &, | |
41 | const line_type &); | |
42 | virtual void solid_arc(const position ¢, double rad, double start_angle, | |
43 | double end_angle, const line_type <); | |
44 | void dashed_rounded_box(const position &, const distance &, double, | |
45 | const line_type &); | |
46 | void dotted_rounded_box(const position &, const distance &, double, | |
47 | const line_type &); | |
48 | void solid_rounded_box(const position &, const distance &, double, | |
49 | const line_type &); | |
50 | void filled_rounded_box(const position &, const distance &, double, double); | |
51 | public: | |
52 | void start_picture(double sc, const position &ll, const position &ur) = 0; | |
53 | void finish_picture() = 0; | |
54 | void circle(const position &, double rad, const line_type &, double) = 0; | |
55 | void text(const position &, text_piece *, int, double) = 0; | |
56 | void line(const position &, const position *, int n, const line_type &) = 0; | |
57 | void polygon(const position *, int n, const line_type &, double) = 0; | |
58 | void spline(const position &, const position *, int n, | |
59 | const line_type &) = 0; | |
60 | void arc(const position &, const position &, const position &, | |
61 | const line_type &) = 0; | |
62 | void ellipse(const position &, const distance &, | |
63 | const line_type &, double) = 0; | |
64 | void rounded_box(const position &, const distance &, double, | |
65 | const line_type &, double); | |
66 | }; | |
67 | ||
68 | int compute_arc_center(const position &start, const position ¢, | |
69 | const position &end, position *result); | |
70 |