2 * $Id: bitmap.h,v 1.13 2004/04/13 17:23:52 broeker Exp $
5 /* GNUPLOT - bitmap.h */
8 * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
10 * Permission to use, copy, and distribute this software and its
11 * documentation for any purpose with or without fee is hereby granted,
12 * provided that the above copyright notice appear in all copies and
13 * that both that copyright notice and this permission notice appear
14 * in supporting documentation.
16 * Permission to modify the software is granted, but not the right to
17 * distribute the complete modified source code. Modifications are to
18 * be distributed as patches to the released version. Permission to
19 * distribute binaries produced by compiling modified sources is granted,
21 * 1. distribute the corresponding source modifications from the
22 * released version in the form of a patch file along with the binaries,
23 * 2. add special version identification to distinguish your version
24 * in addition to the base release version number,
25 * 3. provide your name and address as the primary contact for the
26 * support of your modified version, and
27 * 4. retain our contact information in regard to use of the base
29 * Permission to distribute the released version of the source code along
30 * with corresponding source modifications in the form of a patch file is
31 * granted with same provisions 2 through 4 for binary distributions.
33 * This software is provided "as is" without express or implied warranty
34 * to the extent permitted by applicable law.
37 #ifndef GNUPLOT_BITMAP_H
38 # define GNUPLOT_BITMAP_H
42 /* allow up to 16 bit width for character array */
43 typedef unsigned int char_row;
44 typedef char_row const GPFAR * GPFAR char_box;
46 #define FNT_CHARS 96 /* Number of characters in the font set */
49 #define FNT5X9_VCHAR 11 /* vertical spacing between characters */
50 #define FNT5X9_VBITS 9 /* actual number of rows of bits per char */
51 #define FNT5X9_HCHAR 7 /* horizontal spacing between characters */
52 #define FNT5X9_HBITS 5 /* actual number of bits per row per char */
53 extern const char_row GPFAR fnt5x9[FNT_CHARS][FNT5X9_VBITS];
56 #define FNT9X17_VCHAR 21 /* vertical spacing between characters */
57 #define FNT9X17_VBITS 17 /* actual number of rows of bits per char */
58 #define FNT9X17_HCHAR 13 /* horizontal spacing between characters */
59 #define FNT9X17_HBITS 9 /* actual number of bits per row per char */
60 extern const char_row GPFAR fnt9x17[FNT_CHARS][FNT9X17_VBITS];
63 #define FNT13X25_VCHAR 31 /* vertical spacing between characters */
64 #define FNT13X25_VBITS 25 /* actual number of rows of bits per char */
65 #define FNT13X25_HCHAR 19 /* horizontal spacing between characters */
66 #define FNT13X25_HBITS 13 /* actual number of bits per row per char */
67 extern const char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS];
70 typedef unsigned char pixels; /* the type of one set of 8 pixels in bitmap */
71 typedef pixels *bitmap[]; /* the bitmap */
73 extern bitmap *b_p; /* global pointer to bitmap */
74 extern unsigned int b_xsize, b_ysize; /* the size of the bitmap */
75 extern unsigned int b_planes; /* number of color planes */
76 extern unsigned int b_psize; /* size of each plane */
77 extern unsigned int b_rastermode; /* raster mode rotates -90deg */
78 extern unsigned int b_linemask; /* 16 bit mask for dotted lines */
79 extern unsigned int b_angle; /* rotation of text */
80 extern int b_maskcount;
82 /* RGB colour table moved out of gif.trm */
84 * Common RGB color table for use by all devices.
85 * It's a subset of the 216-color Web palette.
87 #define WEB_N_COLORS 99
90 unsigned char r, g, b;
93 extern struct rgb web_color_rgbs[];
96 /* Prototypes from file "bitmap.c" */
98 unsigned int b_getpixel __PROTO((unsigned int, unsigned int));
99 void b_makebitmap __PROTO((unsigned int, unsigned int, unsigned int));
100 void b_freebitmap __PROTO((void));
101 void b_charsize __PROTO((unsigned int));
102 void b_setvalue __PROTO((unsigned int));
104 void b_setlinetype __PROTO((int));
105 void b_move __PROTO((unsigned int, unsigned int));
106 void b_vector __PROTO((unsigned int, unsigned int));
107 void b_put_text __PROTO((unsigned int, unsigned int, const char *));
108 int b_text_angle __PROTO((int));
109 void b_boxfill __PROTO((int, unsigned int, unsigned int, unsigned int, unsigned int));
111 #endif /* GNUPLOT_BITMAP_H */