r104: initial cvs import
[ctsim.git] / libctgraphics / sgptext.cpp
diff --git a/libctgraphics/sgptext.cpp b/libctgraphics/sgptext.cpp
new file mode 100644 (file)
index 0000000..a4cb1a3
--- /dev/null
@@ -0,0 +1,116 @@
+/*****************************************************************************
+**  This is part of the CTSim program
+**  Copyright (C) 1983-2000 Kevin Rosenberg
+**
+**  $Id: sgptext.cpp,v 1.1 2000/06/19 18:05:03 kevin Exp $
+**  $Log: sgptext.cpp,v $
+**  Revision 1.1  2000/06/19 18:05:03  kevin
+**  initial cvs import
+**
+**  Revision 1.1  2000/06/13 16:20:31  kevin
+**  finished c++ conversions
+**
+**  Revision 1.2  2000/04/28 18:35:23  kevin
+**  removed unused files
+**
+**  Revision 1.1.1.1  2000/04/28 13:02:44  kevin
+**  Initial CVS import for first public release
+**
+**
+**
+**  This program is free software; you can redistribute it and/or modify
+**  it under the terms of the GNU General Public License (version 2) as
+**  published by the Free Software Foundation.
+**
+**  This program is distributed in the hope that it will be useful,
+**  but WITHOUT ANY WARRANTY; without even the implied warranty of
+**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**  GNU General Public License for more details.
+**
+**  You should have received a copy of the GNU General Public License
+**  along with this program; if not, write to the Free Software
+**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+******************************************************************************/
+/* FILE
+ *   sgptext.c                         Text routines for graphics package
+ */
+
+#include "kstddef.h"
+#include "sgp.h"
+#include <stdio.h>
+#include "cio.h"
+
+
+/* Pixel patterns of marker symbols (1x1 to 5x5 matrix) */
+char MARKER[NMARKERS][5] = {
+       { '\0', '\0', '\010', '\0', '\0'},              /* small dot */
+       { '\0', '\034', '\024', '\034', '\0'},          /* empty square */
+       { '\0', '\034', '\034', '\034', '\0'},          /* filled square */
+       { '\0', '\010', '\024', '\010', '\0'},          /* empty diamond */
+       { '\0', '\010', '\034', '\010', '\0'},          /* filled diamond */
+       { '\010', '\010', '\076', '\010', '\010'},      /* cross */
+       { '\0', '\024', '\010', '\024', '\0'},          /* x */
+       { '\034', '\042', '\042', '\042', '\034'},      /* open circle */
+       { '\034', '\076', '\076', '\076', '\034'},      /* filled circle */
+       { '\076', '\042', '\042', '\042', '\076'},      /* big open square */
+       { '\010', '\024', '\042', '\024', '\010'}};     /* big open diamond */
+
+/* WRTSYMBOL (sym, x, y, dev)
+ *
+ * puts marker symbols on the screen
+ * input in screen pixels
+ * Calls: dot()
+ */
+
+void 
+wrtsymbol (
+    int sym,
+    int x,
+    int y,           /* Coordinates in screen pixels */
+    DEVICE *dev
+)
+{
+} 
+
+/*
+ * WRTCHAR(<CH>, <X>, <Y>, cspec, dev)
+ *
+ * puts marker symbols on the screen
+ * input in screen pixels
+ * Calls: dot(), peek()
+ */
+
+void 
+wrtchar (
+    int ch,    /* Character to be put on the screen */
+    int x,
+    int y,     /* Coordinates in screen pixels of lower left corner*/
+    CHARSPEC *cspec,
+    DEVICE *dev
+)
+{
+} 
+
+/*
+ * WRTTEXT (<STRING>)
+ *
+ * prints a string starting from current position writing in the current
+ * printing direction (at right angle to the character direction)
+ * The pen is return to the original position.
+ */
+
+void
+wrttext (char txtstr[], int x, int y, CHARSPEC *cspec, DEVICE *dev)
+{
+} 
+
+
+/*
+ * SETCOLOR( <COLOR>)
+ *
+ * Set current color
+ */
+void 
+crtcolor (int mode, int *f, int *b)
+{
+}