175584Sru// -*- C++ -*-
2151497Sru/* Copyright (C) 1989, 1990, 1991, 1992, 1993, 2003
3151497Sru   Free Software Foundation, Inc.
475584Sru     Written by James Clark (jjc@jclark.com)
575584Sru
675584SruThis file is part of groff.
775584Sru
875584Srugroff is free software; you can redistribute it and/or modify it under
975584Sruthe terms of the GNU General Public License as published by the Free
1075584SruSoftware Foundation; either version 2, or (at your option) any later
1175584Sruversion.
1275584Sru
1375584Srugroff is distributed in the hope that it will be useful, but WITHOUT ANY
1475584SruWARRANTY; without even the implied warranty of MERCHANTABILITY or
1575584SruFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1675584Srufor more details.
1775584Sru
1875584SruYou should have received a copy of the GNU General Public License along
1975584Sruwith groff; see the file COPYING.  If not, write to the Free Software
20151497SruFoundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
2175584Sru
2275584Sruclass common_output : public output {
2375584Sruprivate:
2475584Sru  void dash_line(const position &start, const position &end,
2575584Sru		 const line_type &lt, double dash_width, double gap_width,
2675584Sru		 double *offsetp);
2775584Sru  void dash_arc(const position &cent, double rad,
2875584Sru		double start_angle, double end_angle, const line_type &lt,
2975584Sru		double dash_width, double gap_width, double *offsetp);
3075584Sru  void dot_line(const position &start, const position &end,
3175584Sru		const line_type &lt, double gap_width, double *offsetp);
3275584Sru  void dot_arc(const position &cent, double rad,
3375584Sru	       double start_angle, double end_angle, const line_type &lt,
3475584Sru	       double gap_width, double *offsetp);
3575584Sruprotected:
3675584Sru  virtual void dot(const position &, const line_type &) = 0;
37151497Sru  void ellipse_arc(const position &, const position &,
38151497Sru		   const position &, const distance &,
39151497Sru		   const line_type &);
4075584Sru  void dashed_circle(const position &, double rad, const line_type &);
4175584Sru  void dotted_circle(const position &, double rad, const line_type &);
42151497Sru  void dashed_ellipse(const position &, const distance &, const line_type &);
43151497Sru  void dotted_ellipse(const position &, const distance &, const line_type &);
4475584Sru  void dashed_arc(const position &, const position &, const position &,
4575584Sru		  const line_type &);
4675584Sru  void dotted_arc(const position &, const position &, const position &,
4775584Sru		  const line_type &);
4875584Sru  virtual void solid_arc(const position &cent, double rad, double start_angle,
4975584Sru			 double end_angle, const line_type &lt);
5075584Sru  void dashed_rounded_box(const position &, const distance &, double,
5175584Sru			  const line_type &);
5275584Sru  void dotted_rounded_box(const position &, const distance &, double,
5375584Sru			  const line_type &);
5475584Sru  void solid_rounded_box(const position &, const distance &, double,
5575584Sru			 const line_type &);
5675584Sru  void filled_rounded_box(const position &, const distance &, double, double);
5775584Srupublic:
5875584Sru  void start_picture(double sc, const position &ll, const position &ur) = 0;
5975584Sru  void finish_picture() = 0;
6075584Sru  void circle(const position &, double rad, const line_type &, double) = 0;
6175584Sru  void text(const position &, text_piece *, int, double) = 0;
6275584Sru  void line(const position &, const position *, int n, const line_type &) = 0;
6375584Sru  void polygon(const position *, int n, const line_type &, double) = 0;
6475584Sru  void spline(const position &, const position *, int n,
6575584Sru	      const line_type &) = 0;
6675584Sru  void arc(const position &, const position &, const position &,
6775584Sru	   const line_type &) = 0;
6875584Sru  void ellipse(const position &, const distance &,
6975584Sru	       const line_type &, double) = 0;
7075584Sru  void rounded_box(const position &, const distance &, double,
7175584Sru		   const line_type &, double);
72104862Sru  void set_color(char *, char *) = 0;
73104862Sru  void reset_color() = 0;
74104862Sru  char *get_last_filled() = 0;
75104862Sru  char *get_outline_color() = 0;
7675584Sru};
7775584Sru
7875584Sruint compute_arc_center(const position &start, const position &cent,
7975584Sru		       const position &end, position *result);
8075584Sru
81