| Commit | Line | Data |
|---|---|---|
| 92d0a6a6 | 1 | // -*- C++ -*- |
| 4d3e9548 | 2 | /* Copyright (C) 1989, 1990, 1991, 1992, 1993, 2003, 2007, 2009 |
| 92d0a6a6 JR |
3 | Free Software Foundation, Inc. |
| 4 | Written by James Clark (jjc@jclark.com) | |
| 5 | ||
| 6 | This file is part of groff. | |
| 7 | ||
| 8 | groff is free software; you can redistribute it and/or modify it under | |
| 9 | the terms of the GNU General Public License as published by the Free | |
| 4d3e9548 JL |
10 | Software Foundation, either version 3 of the License, or |
| 11 | (at your option) any later version. | |
| 92d0a6a6 JR |
12 | |
| 13 | groff is distributed in the hope that it will be useful, but WITHOUT ANY | |
| 14 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| 16 | for more details. | |
| 17 | ||
| 4d3e9548 JL |
18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
| 92d0a6a6 JR |
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 ellipse_arc(const position &, const position &, | |
| 37 | const position &, const distance &, | |
| 38 | const line_type &); | |
| 39 | void dashed_circle(const position &, double rad, const line_type &); | |
| 40 | void dotted_circle(const position &, double rad, const line_type &); | |
| 41 | void dashed_ellipse(const position &, const distance &, const line_type &); | |
| 42 | void dotted_ellipse(const position &, const distance &, const line_type &); | |
| 43 | void dashed_arc(const position &, const position &, const position &, | |
| 44 | const line_type &); | |
| 45 | void dotted_arc(const position &, const position &, const position &, | |
| 46 | const line_type &); | |
| 47 | virtual void solid_arc(const position ¢, double rad, double start_angle, | |
| 48 | double end_angle, const line_type <); | |
| 49 | void dashed_rounded_box(const position &, const distance &, double, | |
| 50 | const line_type &); | |
| 51 | void dotted_rounded_box(const position &, const distance &, double, | |
| 52 | const line_type &); | |
| 53 | void solid_rounded_box(const position &, const distance &, double, | |
| 54 | const line_type &); | |
| 4d3e9548 JL |
55 | void filled_rounded_box(const position &, const distance &, double, |
| 56 | double); | |
| 92d0a6a6 JR |
57 | public: |
| 58 | void start_picture(double sc, const position &ll, const position &ur) = 0; | |
| 59 | void finish_picture() = 0; | |
| 60 | void circle(const position &, double rad, const line_type &, double) = 0; | |
| 61 | void text(const position &, text_piece *, int, double) = 0; | |
| 62 | void line(const position &, const position *, int n, const line_type &) = 0; | |
| 63 | void polygon(const position *, int n, const line_type &, double) = 0; | |
| 64 | void spline(const position &, const position *, int n, | |
| 65 | const line_type &) = 0; | |
| 66 | void arc(const position &, const position &, const position &, | |
| 67 | const line_type &) = 0; | |
| 68 | void ellipse(const position &, const distance &, | |
| 69 | const line_type &, double) = 0; | |
| 70 | void rounded_box(const position &, const distance &, double, | |
| 4d3e9548 | 71 | const line_type &, double, char *); |
| 92d0a6a6 JR |
72 | void set_color(char *, char *) = 0; |
| 73 | void reset_color() = 0; | |
| 74 | char *get_last_filled() = 0; | |
| 75 | char *get_outline_color() = 0; | |
| 76 | }; | |
| 77 | ||
| 78 | int compute_arc_center(const position &start, const position ¢, | |
| 79 | const position &end, position *result); | |
| 80 |