r109: reorganized header files
[ctsim.git] / libctgraphics / sgptext.cpp
1 /*****************************************************************************
2 **  This is part of the CTSim program
3 **  Copyright (C) 1983-2000 Kevin Rosenberg
4 **
5 **  $Id: sgptext.cpp,v 1.2 2000/06/19 19:04:05 kevin Exp $
6 **
7 **  This program is free software; you can redistribute it and/or modify
8 **  it under the terms of the GNU General Public License (version 2) as
9 **  published by the Free Software Foundation.
10 **
11 **  This program is distributed in the hope that it will be useful,
12 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 **  GNU General Public License for more details.
15 **
16 **  You should have received a copy of the GNU General Public License
17 **  along with this program; if not, write to the Free Software
18 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 ******************************************************************************/
20
21 /* FILE
22  *   sgptext.c                          Text routines for graphics package
23  */
24
25 #include <stdio.h>
26 #include "ctsupport.h"
27 #include "sgp.h"
28
29
30 /* Pixel patterns of marker symbols (1x1 to 5x5 matrix) */
31 char MARKER[NMARKERS][5] = {
32         { '\0', '\0', '\010', '\0', '\0'},              /* small dot */
33         { '\0', '\034', '\024', '\034', '\0'},          /* empty square */
34         { '\0', '\034', '\034', '\034', '\0'},          /* filled square */
35         { '\0', '\010', '\024', '\010', '\0'},          /* empty diamond */
36         { '\0', '\010', '\034', '\010', '\0'},          /* filled diamond */
37         { '\010', '\010', '\076', '\010', '\010'},      /* cross */
38         { '\0', '\024', '\010', '\024', '\0'},          /* x */
39         { '\034', '\042', '\042', '\042', '\034'},      /* open circle */
40         { '\034', '\076', '\076', '\076', '\034'},      /* filled circle */
41         { '\076', '\042', '\042', '\042', '\076'},      /* big open square */
42         { '\010', '\024', '\042', '\024', '\010'}};     /* big open diamond */
43
44 /* WRTSYMBOL (sym, x, y, dev)
45  *
46  * puts marker symbols on the screen
47  * input in screen pixels
48  * Calls: dot()
49  */
50
51 void 
52 wrtsymbol (
53     int sym,
54     int x,
55     int y,            /* Coordinates in screen pixels */
56     DEVICE *dev
57 )
58 {
59
60
61 /*
62  * WRTCHAR(<CH>, <X>, <Y>, cspec, dev)
63  *
64  * puts marker symbols on the screen
65  * input in screen pixels
66  * Calls: dot(), peek()
67  */
68
69 void 
70 wrtchar (
71     int ch,     /* Character to be put on the screen */
72     int x,
73     int y,      /* Coordinates in screen pixels of lower left corner*/
74     CHARSPEC *cspec,
75     DEVICE *dev
76 )
77 {
78
79
80 /*
81  * WRTTEXT (<STRING>)
82  *
83  * prints a string starting from current position writing in the current
84  * printing direction (at right angle to the character direction)
85  * The pen is return to the original position.
86  */
87
88 void
89 wrttext (char txtstr[], int x, int y, CHARSPEC *cspec, DEVICE *dev)
90 {
91
92
93
94 /*
95  * SETCOLOR( <COLOR>)
96  *
97  * Set current color
98  */
99 void 
100 crtcolor (int mode, int *f, int *b)
101 {
102 }