4 /* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004
5 Free Software Foundation, Inc.
6 Written by James Clark (jjc@jclark.com)
8 This file is part of groff.
10 groff is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free
12 Software Foundation; either version 2, or (at your option) any later
15 groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License along
21 with groff; see the file COPYING. If not, write to the Free Software
22 Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
48 virtual position
origin();
49 virtual double width();
50 virtual double radius();
51 virtual double height();
52 virtual position
north();
53 virtual position
south();
54 virtual position
east();
55 virtual position
west();
56 virtual position
north_east();
57 virtual position
north_west();
58 virtual position
south_east();
59 virtual position
south_west();
60 virtual position
start();
61 virtual position
end();
62 virtual position
center();
63 virtual place
*find_label(const char *);
64 virtual void move_by(const position
&);
66 virtual void update_bounding_box(bounding_box
*);
67 virtual object_type
type() = 0;
69 virtual void print_text();
72 typedef position (object::*corner
)();
84 string_list
*label_list
;
90 path(char *, corner
= 0);
94 void set_ypath(path
*);
95 int follow(const place
&, place
*) const;
102 void append(object
*);
103 void wrap_up_block(object_list
*);
106 declare_ptable(place
)
108 // these go counterclockwise
116 struct graphics_state
{
121 struct saved_state
: public graphics_state
{
131 const char *filename
;
134 text_item(char *, const char *, int);
138 const unsigned long IS_DOTTED
= 01;
139 const unsigned long IS_DASHED
= 02;
140 const unsigned long IS_CLOCKWISE
= 04;
141 const unsigned long IS_INVISIBLE
= 020;
142 const unsigned long HAS_LEFT_ARROW_HEAD
= 040;
143 const unsigned long HAS_RIGHT_ARROW_HEAD
= 0100;
144 const unsigned long HAS_SEGMENT
= 0200;
145 const unsigned long IS_SAME
= 0400;
146 const unsigned long HAS_FROM
= 01000;
147 const unsigned long HAS_AT
= 02000;
148 const unsigned long HAS_WITH
= 04000;
149 const unsigned long HAS_HEIGHT
= 010000;
150 const unsigned long HAS_WIDTH
= 020000;
151 const unsigned long HAS_RADIUS
= 040000;
152 const unsigned long HAS_TO
= 0100000;
153 const unsigned long IS_CHOPPED
= 0200000;
154 const unsigned long IS_DEFAULT_CHOPPED
= 0400000;
155 const unsigned long HAS_THICKNESS
= 01000000;
156 const unsigned long IS_FILLED
= 02000000;
157 const unsigned long IS_DEFAULT_FILLED
= 04000000;
158 const unsigned long IS_ALIGNED
= 010000000;
159 const unsigned long IS_SHADED
= 020000000;
160 const unsigned long IS_OUTLINED
= 040000000;
166 segment(const position
&, int, segment
*);
169 class rectangle_object
;
170 class graphic_object
;
188 double segment_width
;
189 double segment_height
;
197 segment
*segment_list
;
198 position segment_pos
;
199 int segment_is_absolute
;
201 object_spec(object_type
);
203 object
*make_object(position
*, direction
*);
204 graphic_object
*make_box(position
*, direction
*);
205 graphic_object
*make_block(position
*, direction
*);
206 graphic_object
*make_text(position
*, direction
*);
207 graphic_object
*make_ellipse(position
*, direction
*);
208 graphic_object
*make_circle(position
*, direction
*);
209 linear_object
*make_line(position
*, direction
*);
210 linear_object
*make_arc(position
*, direction
*);
211 graphic_object
*make_linear(position
*, direction
*);
212 graphic_object
*make_move(position
*, direction
*);
213 int position_rectangle(rectangle_object
*p
, position
*curpos
,
218 object
*make_object(object_spec
*, position
*, direction
*);
220 object
*make_mark_object();
221 object
*make_command_object(char *, const char *, int);
223 int lookup_variable(const char *name
, double *val
);
224 void define_variable(const char *name
, double val
);
226 void print_picture(object
*);