BRL-CAD
vectfont.h
Go to the documentation of this file.
1/* V E C T F O N T . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-2023 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20
21#ifndef BV_VECTFONT_H
22#define BV_VECTFONT_H
23
24#include "common.h"
25#include "bv/defines.h"
26
27__BEGIN_DECLS
28
29/** @addtogroup bv_vfont
30 *
31 * @brief
32 * Terminal Independent Graphics Display Package.
33 *
34 * Mike Muuss July 31, 1978
35 *
36 * This routine is used to plot a string of ASCII symbols
37 * on the plot being generated, using a built-in set of fonts
38 * drawn as vector lists.
39 *
40 * Internally, the basic font resides in a 10x10 unit square.
41 * Externally, each character can be thought to occupy one square
42 * plotting unit; the 'scale'
43 * parameter allows this to be changed as desired, although scale
44 * factors less than 10.0 are unlikely to be legible.
45 *
46 * The vector font table here was provided courtesy of Dr. Bruce
47 * Henrikson and Dr. Stephen Wolff, US Army Ballistic Research
48 * Laboratory, Summer of 1978. They had developed it for their
49 * remote Houston Instruments pen plotter package for the
50 * GE Tymeshare system.
51 *
52 * Used by LIBPLOT3 and LIBRT for simple vector fonts.
53 *
54 * Vector font definitions, for TIG-PACK fonts.
55 */
56/** @{ */
57/** @file bv/vectfont.h */
58
59/*
60 * Motion encoding macros
61 *
62 * All characters reference absolute points within a 10 x 10 square
63 */
64#define brt(x, y) (11*x+y)
65#define drk(x, y) -(11*x+y)
66#define VFONT_LAST -128 /**< @brief 0200 Marks end of stroke list */
67#define NEGY -127 /**< @brief 0201 Denotes negative y stroke */
68#define bneg(x, y) NEGY, brt(x, y)
69#define dneg(x, y) NEGY, drk(x, y)
70
71BV_EXPORT extern int *tp_getchar(const unsigned char *c);
72
73/*
74 * Once-only setup routine
75 * Used by libplot3/symbol.c, so it can't be static.
76 * DEPRECATED: libplot3 has been merged into libbn, so this no longer needs to be public.
77 */
78BV_EXPORT extern void tp_setup(void);
79
80/** @} */
81
82__END_DECLS
83
84#endif /* BV_VECTFONT_H */
85
86/*
87 * Local Variables:
88 * mode: C
89 * tab-width: 8
90 * indent-tabs-mode: t
91 * c-file-style: "stroustrup"
92 * End:
93 * ex: shiftwidth=4 tabstop=8
94 */
Header file for the BRL-CAD common definitions.
void int * c
Definition: tig.h:139
int * tp_getchar(const unsigned char *c)
void tp_setup(void)