a4cb1a3b133f63707dbb9b54504eb564854bc1cf
[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.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
8 **  initial cvs import
9 **
10 **  Revision 1.1  2000/06/13 16:20:31  kevin
11 **  finished c++ conversions
12 **
13 **  Revision 1.2  2000/04/28 18:35:23  kevin
14 **  removed unused files
15 **
16 **  Revision 1.1.1.1  2000/04/28 13:02:44  kevin
17 **  Initial CVS import for first public release
18 **
19 **
20 **
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.
24 **
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.
29 **
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 ******************************************************************************/
34 /* FILE
35  *   sgptext.c                          Text routines for graphics package
36  */
37
38 #include "kstddef.h"
39 #include "sgp.h"
40 #include <stdio.h>
41 #include "cio.h"
42
43
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 */
57
58 /* WRTSYMBOL (sym, x, y, dev)
59  *
60  * puts marker symbols on the screen
61  * input in screen pixels
62  * Calls: dot()
63  */
64
65 void 
66 wrtsymbol (
67     int sym,
68     int x,
69     int y,            /* Coordinates in screen pixels */
70     DEVICE *dev
71 )
72 {
73
74
75 /*
76  * WRTCHAR(<CH>, <X>, <Y>, cspec, dev)
77  *
78  * puts marker symbols on the screen
79  * input in screen pixels
80  * Calls: dot(), peek()
81  */
82
83 void 
84 wrtchar (
85     int ch,     /* Character to be put on the screen */
86     int x,
87     int y,      /* Coordinates in screen pixels of lower left corner*/
88     CHARSPEC *cspec,
89     DEVICE *dev
90 )
91 {
92
93
94 /*
95  * WRTTEXT (<STRING>)
96  *
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.
100  */
101
102 void
103 wrttext (char txtstr[], int x, int y, CHARSPEC *cspec, DEVICE *dev)
104 {
105
106
107
108 /*
109  * SETCOLOR( <COLOR>)
110  *
111  * Set current color
112  */
113 void 
114 crtcolor (int mode, int *f, int *b)
115 {
116 }