[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.2

1.1.1.2 ! maekawa     1: /* $Id: bitmap.h,v 1.1.1.2.2.1 1999/09/29 13:48:16 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:
                     35:
                     36: /* allow up to 16 bit width for character array */
                     37: typedef unsigned int char_row;
                     38: typedef char_row GPFAR * GPFAR char_box;
                     39:
                     40: #define FNT_CHARS   96      /* Number of characters in the font set */
                     41:
                     42: #define FNT5X9 0
                     43: #define FNT5X9_VCHAR 11 /* vertical spacing between characters */
                     44: #define FNT5X9_VBITS 9 /* actual number of rows of bits per char */
                     45: #define FNT5X9_HCHAR 7 /* horizontal spacing between characters */
                     46: #define FNT5X9_HBITS 5 /* actual number of bits per row per char */
                     47: extern char_row GPFAR fnt5x9[FNT_CHARS][FNT5X9_VBITS];
                     48:
                     49: #define FNT9X17 1
                     50: #define FNT9X17_VCHAR 21 /* vertical spacing between characters */
                     51: #define FNT9X17_VBITS 17 /* actual number of rows of bits per char */
                     52: #define FNT9X17_HCHAR 13 /* horizontal spacing between characters */
                     53: #define FNT9X17_HBITS 9 /* actual number of bits per row per char */
                     54: extern char_row GPFAR fnt9x17[FNT_CHARS][FNT9X17_VBITS];
                     55:
                     56: #define FNT13X25 2
                     57: #define FNT13X25_VCHAR 31 /* vertical spacing between characters */
                     58: #define FNT13X25_VBITS 25 /* actual number of rows of bits per char */
                     59: #define FNT13X25_HCHAR 19 /* horizontal spacing between characters */
                     60: #define FNT13X25_HBITS 13 /* actual number of bits per row per char */
                     61: extern char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS];
                     62:
                     63:
                     64: typedef unsigned char pixels;  /* the type of one set of 8 pixels in bitmap */
                     65: typedef pixels *bitmap[];  /* the bitmap */
                     66:
                     67: extern bitmap *b_p;                                            /* global pointer to bitmap */
                     68: extern unsigned int b_currx, b_curry;  /* the current coordinates */
                     69: extern unsigned int b_xsize, b_ysize;  /* the size of the bitmap */
                     70: extern unsigned int b_planes;                  /* number of color planes */
                     71: extern unsigned int b_psize;                   /* size of each plane */
                     72: extern unsigned int b_rastermode;              /* raster mode rotates -90deg */
                     73: extern unsigned int b_linemask;                        /* 16 bit mask for dotted lines */
                     74: extern unsigned int b_value;                   /* colour of lines */
                     75: extern unsigned int b_hchar;                   /* width of characters */
                     76: extern unsigned int b_hbits;                   /* actual bits in char horizontally */
                     77: extern unsigned int b_vchar;                   /* height of characters */
                     78: extern unsigned int b_vbits;                   /* actual bits in char vertically */
                     79: extern unsigned int b_angle;                   /* rotation of text */
                     80: extern char_box b_font[FNT_CHARS];             /* the current font */
                     81: extern unsigned int b_pattern[];
                     82: extern int b_maskcount;
                     83: extern unsigned int b_lastx, b_lasty;  /* last pixel set - used by b_line */
1.1.1.2 ! maekawa    84:
        !            85: /* RGB colour table moved out of gif.trm */
        !            86: /*
        !            87:  * Common RGB color table for use by all devices.
        !            88:  * It's a subset of the 216-color Web palette.
        !            89:  */
        !            90: #define WEB_N_COLORS 99
        !            91: struct rgb
        !            92: {
        !            93:     unsigned char r, g, b;
        !            94: };
        !            95:
        !            96: extern struct rgb web_color_rgbs[];
1.1       maekawa    97:
                     98:
                     99: /* Prototypes from file "bitmap.c" */
                    100:
                    101: void b_makebitmap __PROTO((unsigned int x, unsigned int y, unsigned int planes));
                    102: void b_freebitmap __PROTO((void));
                    103: void b_setpixel __PROTO((unsigned int x, unsigned int y, unsigned int value));
                    104: /* unused unsigned int b_getpixel __PROTO((unsigned int x, unsigned int y)); */
                    105: void b_line __PROTO((unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2));
                    106: void b_setmaskpixel __PROTO((unsigned int x, unsigned int y, unsigned int value));
                    107: /* void b_putc __PROTO((unsigned int x, unsigned int y, char c, unsigned int angle)); */
                    108: void b_charsize __PROTO((unsigned int size));
                    109: void b_setvalue __PROTO((unsigned int value));
                    110:
                    111: void b_setlinetype __PROTO((int linetype));
                    112: void b_move __PROTO((unsigned int x, unsigned int y));
                    113: void b_vector __PROTO((unsigned int x, unsigned int y));
                    114: void b_put_text __PROTO((unsigned int x, unsigned int y, char *str));
                    115: int b_text_angle __PROTO((int ang));

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