1 /*****************************************************************************
2 ** This is part of the CTSim program
3 ** Copyright (C) 1983-2000 Kevin Rosenberg
5 ** $Id: sgptext.cpp,v 1.1 2000/06/19 18:05:03 kevin Exp $
6 ** $Log: sgptext.cpp,v $
7 ** Revision 1.1 2000/06/19 18:05:03 kevin
10 ** Revision 1.1 2000/06/13 16:20:31 kevin
11 ** finished c++ conversions
13 ** Revision 1.2 2000/04/28 18:35:23 kevin
14 ** removed unused files
16 ** Revision 1.1.1.1 2000/04/28 13:02:44 kevin
17 ** Initial CVS import for first public release
21 ** This program is free software; you can redistribute it and/or modify
22 ** it under the terms of the GNU General Public License (version 2) as
23 ** published by the Free Software Foundation.
25 ** This program is distributed in the hope that it will be useful,
26 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
27 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ** GNU General Public License for more details.
30 ** You should have received a copy of the GNU General Public License
31 ** along with this program; if not, write to the Free Software
32 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 ******************************************************************************/
35 * sgptext.c Text routines for graphics package
44 /* Pixel patterns of marker symbols (1x1 to 5x5 matrix) */
45 char MARKER[NMARKERS][5] = {
46 { '\0', '\0', '\010', '\0', '\0'}, /* small dot */
47 { '\0', '\034', '\024', '\034', '\0'}, /* empty square */
48 { '\0', '\034', '\034', '\034', '\0'}, /* filled square */
49 { '\0', '\010', '\024', '\010', '\0'}, /* empty diamond */
50 { '\0', '\010', '\034', '\010', '\0'}, /* filled diamond */
51 { '\010', '\010', '\076', '\010', '\010'}, /* cross */
52 { '\0', '\024', '\010', '\024', '\0'}, /* x */
53 { '\034', '\042', '\042', '\042', '\034'}, /* open circle */
54 { '\034', '\076', '\076', '\076', '\034'}, /* filled circle */
55 { '\076', '\042', '\042', '\042', '\076'}, /* big open square */
56 { '\010', '\024', '\042', '\024', '\010'}}; /* big open diamond */
58 /* WRTSYMBOL (sym, x, y, dev)
60 * puts marker symbols on the screen
61 * input in screen pixels
69 int y, /* Coordinates in screen pixels */
76 * WRTCHAR(<CH>, <X>, <Y>, cspec, dev)
78 * puts marker symbols on the screen
79 * input in screen pixels
80 * Calls: dot(), peek()
85 int ch, /* Character to be put on the screen */
87 int y, /* Coordinates in screen pixels of lower left corner*/
97 * prints a string starting from current position writing in the current
98 * printing direction (at right angle to the character direction)
99 * The pen is return to the original position.
103 wrttext (char txtstr[], int x, int y, CHARSPEC *cspec, DEVICE *dev)
114 crtcolor (int mode, int *f, int *b)