[BACK]Return to bitmap.h CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Annotation of OpenXM_contrib/gnuplot/bitmap.h, Revision 1.1.1.3

1.1.1.3 ! ohara       1: /* $Id: bitmap.h,v 1.1.1.2.2.3 2002/01/31 21:20:15 lhecking Exp $ */
1.1       maekawa     2:
                      3: /* GNUPLOT - bitmap.h */
                      4:
                      5: /*[
                      6:  * Copyright 1986 - 1993, 1998   Thomas Williams, Colin Kelley
                      7:  *
                      8:  * Permission to use, copy, and distribute this software and its
                      9:  * documentation for any purpose with or without fee is hereby granted,
                     10:  * provided that the above copyright notice appear in all copies and
                     11:  * that both that copyright notice and this permission notice appear
                     12:  * in supporting documentation.
                     13:  *
                     14:  * Permission to modify the software is granted, but not the right to
                     15:  * distribute the complete modified source code.  Modifications are to
                     16:  * be distributed as patches to the released version.  Permission to
                     17:  * distribute binaries produced by compiling modified sources is granted,
                     18:  * provided you
                     19:  *   1. distribute the corresponding source modifications from the
                     20:  *    released version in the form of a patch file along with the binaries,
                     21:  *   2. add special version identification to distinguish your version
                     22:  *    in addition to the base release version number,
                     23:  *   3. provide your name and address as the primary contact for the
                     24:  *    support of your modified version, and
                     25:  *   4. retain our contact information in regard to use of the base
                     26:  *    software.
                     27:  * Permission to distribute the released version of the source code along
                     28:  * with corresponding source modifications in the form of a patch file is
                     29:  * granted with same provisions 2 through 4 for binary distributions.
                     30:  *
                     31:  * This software is provided "as is" without express or implied warranty
                     32:  * to the extent permitted by applicable law.
                     33: ]*/
                     34:
1.1.1.3 ! ohara      35: #ifndef GNUPLOT_BITMAP_H
        !            36: # define GNUPLOT_BITMAP_H
1.1       maekawa    37:
                     38: /* allow up to 16 bit width for character array */
                     39: typedef unsigned int char_row;
                     40: typedef char_row GPFAR * GPFAR char_box;
                     41:
                     42: #define FNT_CHARS   96      /* Number of characters in the font set */
                     43:
                     44: #define FNT5X9 0
                     45: #define FNT5X9_VCHAR 11 /* vertical spacing between characters */
                     46: #define FNT5X9_VBITS 9 /* actual number of rows of bits per char */
                     47: #define FNT5X9_HCHAR 7 /* horizontal spacing between characters */
                     48: #define FNT5X9_HBITS 5 /* actual number of bits per row per char */
                     49: extern char_row GPFAR fnt5x9[FNT_CHARS][FNT5X9_VBITS];
                     50:
                     51: #define FNT9X17 1
                     52: #define FNT9X17_VCHAR 21 /* vertical spacing between characters */
                     53: #define FNT9X17_VBITS 17 /* actual number of rows of bits per char */
                     54: #define FNT9X17_HCHAR 13 /* horizontal spacing between characters */
                     55: #define FNT9X17_HBITS 9 /* actual number of bits per row per char */
                     56: extern char_row GPFAR fnt9x17[FNT_CHARS][FNT9X17_VBITS];
                     57:
                     58: #define FNT13X25 2
                     59: #define FNT13X25_VCHAR 31 /* vertical spacing between characters */
                     60: #define FNT13X25_VBITS 25 /* actual number of rows of bits per char */
                     61: #define FNT13X25_HCHAR 19 /* horizontal spacing between characters */
                     62: #define FNT13X25_HBITS 13 /* actual number of bits per row per char */
                     63: extern char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS];
                     64:
                     65:
                     66: typedef unsigned char pixels;  /* the type of one set of 8 pixels in bitmap */
                     67: typedef pixels *bitmap[];  /* the bitmap */
                     68:
                     69: extern bitmap *b_p;                                            /* global pointer to bitmap */
                     70: extern unsigned int b_currx, b_curry;  /* the current coordinates */
                     71: extern unsigned int b_xsize, b_ysize;  /* the size of the bitmap */
                     72: extern unsigned int b_planes;                  /* number of color planes */
                     73: extern unsigned int b_psize;                   /* size of each plane */
                     74: extern unsigned int b_rastermode;              /* raster mode rotates -90deg */
                     75: extern unsigned int b_linemask;                        /* 16 bit mask for dotted lines */
                     76: extern unsigned int b_value;                   /* colour of lines */
                     77: extern unsigned int b_hchar;                   /* width of characters */
                     78: extern unsigned int b_hbits;                   /* actual bits in char horizontally */
                     79: extern unsigned int b_vchar;                   /* height of characters */
                     80: extern unsigned int b_vbits;                   /* actual bits in char vertically */
                     81: extern unsigned int b_angle;                   /* rotation of text */
                     82: extern char_box b_font[FNT_CHARS];             /* the current font */
                     83: extern unsigned int b_pattern[];
                     84: extern int b_maskcount;
                     85: extern unsigned int b_lastx, b_lasty;  /* last pixel set - used by b_line */
1.1.1.2   maekawa    86:
                     87: /* RGB colour table moved out of gif.trm */
                     88: /*
                     89:  * Common RGB color table for use by all devices.
                     90:  * It's a subset of the 216-color Web palette.
                     91:  */
                     92: #define WEB_N_COLORS 99
                     93: struct rgb
                     94: {
                     95:     unsigned char r, g, b;
                     96: };
                     97:
                     98: extern struct rgb web_color_rgbs[];
1.1       maekawa    99:
                    100:
                    101: /* Prototypes from file "bitmap.c" */
                    102:
                    103: void b_makebitmap __PROTO((unsigned int x, unsigned int y, unsigned int planes));
                    104: void b_freebitmap __PROTO((void));
                    105: void b_setpixel __PROTO((unsigned int x, unsigned int y, unsigned int value));
1.1.1.3 ! ohara     106: unsigned int b_getpixel __PROTO((unsigned int x, unsigned int y));
1.1       maekawa   107: void b_line __PROTO((unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2));
                    108: void b_setmaskpixel __PROTO((unsigned int x, unsigned int y, unsigned int value));
                    109: /* void b_putc __PROTO((unsigned int x, unsigned int y, char c, unsigned int angle)); */
                    110: void b_charsize __PROTO((unsigned int size));
                    111: void b_setvalue __PROTO((unsigned int value));
                    112:
                    113: void b_setlinetype __PROTO((int linetype));
                    114: void b_move __PROTO((unsigned int x, unsigned int y));
                    115: void b_vector __PROTO((unsigned int x, unsigned int y));
                    116: void b_put_text __PROTO((unsigned int x, unsigned int y, char *str));
                    117: int b_text_angle __PROTO((int ang));
1.1.1.3 ! ohara     118:
        !           119: #endif /* GNUPLOT_BITMAP_H */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>