1 /*@ The class `printer' performs the postprocessing. Each postprocessor only
2 *@ needs to implement a derived class of `printer' and a suitable function
3 *@ `make_printer' for the device-dependent tasks. Then the methods of class
4 *@ `printer' are called automatically by `do_file()' in `input.cpp'.
6 * Copyright (c) 2014 - 2017 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
8 * Copyright (C) 1989 - 1992, 2001 - 2004, 2006
9 * Free Software Foundation, Inc.
11 * Written by James Clark (jjc@jclark.com)
13 * This is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * This is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with groff; see the file COPYING. If not, write to the Free
25 * Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA
48 class font_pointer_list
52 font_pointer_list
*next
;
54 font_pointer_list(font
*, font_pointer_list
*);
62 void load_font(int, const char *);
63 void set_ascii_char(unsigned char, const environment
*, int * = 0);
64 void set_special_char(const char *, const environment
*, int * = 0);
65 virtual void set_numbered_char(int, const environment
*, int * = 0);
66 glyph
*set_char_and_width(const char *, const environment
*,
68 font
*get_font_from_index(int);
69 virtual void draw(int, int *, int, const environment
*);
70 // perform change of line color (text, outline) in the print-out
71 virtual void change_color(const environment
* const);
72 // perform change of fill color in the print-out
73 virtual void change_fill_color(const environment
* const);
74 virtual void begin_page(int) = 0;
75 virtual void end_page(int) = 0;
76 virtual font
*make_font(const char *);
77 virtual void end_of_line();
78 virtual void special(char *, const environment
*, char = 'p');
79 virtual void devtag(char *, const environment
*, char = 'p');
82 font_pointer_list
*font_list
;
86 // information about named characters
90 const char *named_char_s
;
94 font
*find_font(const char *);
95 virtual void set_char(glyph
*, font
*, const environment
*, int,
99 printer
*make_printer();