rjl@monu1.cc.monash.edu.au (Russell Lang) (01/05/91)
Submitted-by: Russell Lang <rjl@monu1.cc.monash.edu.au> Posting-number: Volume 16, Issue 13 Archive-name: gnuplot2.02/patch3 Patch-To: gnuplot2.0: Volume 11, Issue 65-79 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: patch2b # Wrapped by eln272v@monu1 on Wed Dec 19 11:57:31 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f patch2b -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"patch2b\" else echo shar: Extracting \"patch2b\" \(56728 characters\) sed "s/^X//" >patch2b <<'END_OF_patch2b' Xdiff -cr ./bitmap.c ../gnuplot2.02/bitmap.c X*** ./bitmap.c Mon Dec 3 15:32:30 1990 X--- ../gnuplot2.02/bitmap.c Thu Dec 6 16:08:08 1990 X*************** X*** 0 X X--- 1,1051 ----- X+ /* GNUPLOT - bitmap.c */ X+ /* X+ * Copyright (C) 1990 X+ * X+ * Permission to use, copy, and distribute this software and its X+ * documentation for any purpose with or without fee is hereby granted, X+ * provided that the above copyright notice appear in all copies and X+ * that both that copyright notice and this permission notice appear X+ * in supporting documentation. X+ * X+ * Permission to modify the software is granted, but not the right to X+ * distribute the modified code. Modifications are to be distributed X+ * as patches to released version. X+ * X+ * This software is provided "as is" without express or implied warranty. X+ * X+ * X+ * AUTHORS X+ * Jyrki Yli-Nokari <jty@intrin.UUCP> X+ * Ronald J. Hartranft <rjh2@ns.cc.lehigh.edu> X+ * Russell Lang <rjl@monu1.cc.monash.edu.au> X+ * X+ * send your comments or suggestions to (pixar!info-gnuplot@sun.com). X+ * X+ */ X+ X+ /* X+ ** General raster plotting routines. X+ ** Raster routines written and copyrighted 1987 by X+ ** Jyrki Yli-Nokari (jty@intrin.UUCP) X+ ** Intrinsic, Ltd. X+ ** X+ ** You may use this code for anything you like as long as X+ ** you are not selling it and the credit is given and X+ ** this message retained. X+ ** X+ */ X+ X+ /* Bitmap plotting routines derived from above raster plotting routines X+ * Russell Lang, 1990 X+ */ X+ X+ #include <stdio.h> X+ #include "plot.h" X+ #include "bitmap.h" X+ X+ bitmap *b_p = (bitmap *)NULL; /* global pointer to bitmap */ X+ unsigned int b_currx, b_curry; /* the current coordinates */ X+ unsigned int b_xsize, b_ysize; /* the size of the bitmap */ X+ unsigned int b_planes; /* number of color planes */ X+ unsigned int b_psize; /* size of each plane */ X+ unsigned int b_rastermode; /* raster mode rotates -90deg */ X+ unsigned int b_linemask = 0xffff; /* 16 bit mask for dotted lines */ X+ unsigned int b_value = 1; /* colour of lines */ X+ unsigned int b_hchar; /* width of characters */ X+ unsigned int b_hbits; /* actual bits in char horizontally */ X+ unsigned int b_vchar; /* height of characters */ X+ unsigned int b_vbits; /* actual bits in char vertically */ X+ unsigned int b_angle; /* rotation of text */ X+ char_box b_font[FNT_CHARS]; /* the current font */ X+ unsigned int b_pattern[] = {0xffff, 0x1111, X+ 0xffff, 0x5555, 0x3333, 0x7777, 0x3f3f, 0x0f0f, 0x5f5f}; X+ int b_maskcount = 0; X+ unsigned int b_lastx, b_lasty; /* last pixel set - used by b_line */ X+ X+ #define IN(i,size) ((unsigned)i < (unsigned)size) X+ X+ /* 5x9 font, bottom row first, left pixel in lsb */ X+ char_row fnt5x9[FNT_CHARS][FNT5X9_VBITS] = { X+ /* */ {000000,000000,000000,000000,000000,000000,000000,000000,000000}, X+ /*!*/ {000000,000000,0x0004,000000,0x0004,0x0004,0x0004,0x0004,0x0004}, X+ /*"*/ {000000,000000,000000,000000,000000,000000,0x000a,0x000a,0x000a}, X+ /*#*/ {000000,000000,0x000a,0x000a,0x001f,0x000a,0x001f,0x000a,0x000a}, X+ /*$*/ {000000,000000,0x0004,0x000f,0x0014,0x000e,0x0005,0x001e,0x0004}, X+ /*%*/ {000000,000000,0x0018,0x0019,0x0002,0x0004,0x0008,0x0013,0x0003}, X+ /*&*/ {000000,000000,0x0016,0x0009,0x0015,0x0002,0x0005,0x0005,0x0002}, X+ /*'*/ {000000,000000,000000,000000,000000,0x0002,0x0004,0x0006,0x0006}, X+ /*(*/ {000000,000000,0x0008,0x0004,0x0002,0x0002,0x0002,0x0004,0x0008}, X+ /*)*/ {000000,000000,0x0002,0x0004,0x0008,0x0008,0x0008,0x0004,0x0002}, X+ /***/ {000000,000000,0x0004,0x0015,0x000e,0x001f,0x000e,0x0015,0x0004}, X+ /*+*/ {000000,000000,000000,0x0004,0x0004,0x001f,0x0004,0x0004,000000}, X+ /*,*/ {000000,0x0002,0x0004,0x0006,0x0006,000000,000000,000000,000000}, X+ /*-*/ {000000,000000,000000,000000,000000,0x001f,000000,000000,000000}, X+ /*.*/ {000000,000000,0x0006,0x0006,000000,000000,000000,000000,000000}, X+ /*-/-*/{000000,000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,000000}, X+ /*0*/ {000000,000000,0x000e,0x0011,0x0013,0x0015,0x0019,0x0011,0x000e}, X+ /*1*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0006,0x0004}, X+ /*2*/ {000000,000000,0x001f,0x0001,0x0001,0x000e,0x0010,0x0011,0x000e}, X+ /*3*/ {000000,000000,0x000e,0x0011,0x0010,0x000c,0x0010,0x0011,0x000e}, X+ /*4*/ {000000,000000,0x0008,0x0008,0x001f,0x0009,0x000a,0x000c,0x0008}, X+ /*5*/ {000000,000000,0x000e,0x0011,0x0010,0x0010,0x000f,0x0001,0x001f}, X+ /*6*/ {000000,000000,0x000e,0x0011,0x0011,0x000f,0x0001,0x0002,0x000c}, X+ /*7*/ {000000,000000,0x0001,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f}, X+ /*8*/ {000000,000000,0x000e,0x0011,0x0011,0x000e,0x0011,0x0011,0x000e}, X+ /*9*/ {000000,000000,0x0006,0x0008,0x0010,0x001e,0x0011,0x0011,0x000e}, X+ /*:*/ {000000,000000,000000,0x0006,0x0006,000000,0x0006,0x0006,000000}, X+ /*;*/ {000000,0x0001,0x0002,0x0006,0x0006,000000,0x0006,0x0006,000000}, X+ /*<*/ {000000,000000,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004,0x0008}, X+ /*=*/ {000000,000000,000000,000000,0x001f,000000,0x001f,000000,000000}, X+ /*>*/ {000000,000000,0x0002,0x0004,0x0008,0x0010,0x0008,0x0004,0x0002}, X+ /*?*/ {000000,000000,0x0004,000000,0x0004,0x0008,0x0010,0x0011,0x000e}, X+ /*@*/ {000000,000000,0x000e,0x0015,0x0015,0x0016,0x0010,0x0011,0x000e}, X+ /*A*/ {000000,000000,0x0011,0x0011,0x001f,0x0011,0x0011,0x000a,0x0004}, X+ /*B*/ {000000,000000,0x000f,0x0012,0x0012,0x000e,0x0012,0x0012,0x000f}, X+ /*C*/ {000000,000000,0x000e,0x0011,0x0001,0x0001,0x0001,0x0011,0x000e}, X+ /*D*/ {000000,000000,0x000f,0x0012,0x0012,0x0012,0x0012,0x0012,0x000f}, X+ /*E*/ {000000,000000,0x001f,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f}, X+ /*F*/ {000000,000000,0x0001,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f}, X+ /*G*/ {000000,000000,0x001e,0x0011,0x0011,0x0019,0x0001,0x0001,0x001e}, X+ /*H*/ {000000,000000,0x0011,0x0011,0x0011,0x001f,0x0011,0x0011,0x0011}, X+ /*I*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x000e}, X+ /*J*/ {000000,000000,0x000e,0x0011,0x0010,0x0010,0x0010,0x0010,0x0010}, X+ /*K*/ {000000,000000,0x0011,0x0009,0x0005,0x0003,0x0005,0x0009,0x0011}, X+ /*L*/ {000000,000000,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, X+ /*M*/ {000000,000000,0x0011,0x0011,0x0011,0x0015,0x0015,0x001b,0x0011}, X+ /*N*/ {000000,000000,0x0011,0x0011,0x0011,0x0019,0x0015,0x0013,0x0011}, X+ /*O*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x000e}, X+ /*P*/ {000000,000000,0x0001,0x0001,0x0001,0x000f,0x0011,0x0011,0x000f}, X+ /*Q*/ {000000,0x0018,0x000e,0x0015,0x0011,0x0011,0x0011,0x0011,0x000e}, X+ /*R*/ {000000,000000,0x0011,0x0009,0x0005,0x000f,0x0011,0x0011,0x000f}, X+ /*S*/ {000000,000000,0x000e,0x0011,0x0010,0x000e,0x0001,0x0011,0x000e}, X+ /*T*/ {000000,000000,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x001f}, X+ /*U*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x0011}, X+ /*V*/ {000000,000000,0x0004,0x0004,0x000a,0x000a,0x0011,0x0011,0x0011}, X+ /*W*/ {000000,000000,0x0011,0x001b,0x0015,0x0011,0x0011,0x0011,0x0011}, X+ /*X*/ {000000,000000,0x0011,0x0011,0x000a,0x0004,0x000a,0x0011,0x0011}, X+ /*Y*/ {000000,000000,0x0004,0x0004,0x0004,0x0004,0x000a,0x0011,0x0011}, X+ /*Z*/ {000000,000000,0x001f,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f}, X+ /*[*/ {000000,000000,0x000e,0x0002,0x0002,0x0002,0x0002,0x0002,0x000e}, X+ /*\*/ {000000,000000,000000,0x0010,0x0008,0x0004,0x0002,0x0001,000000}, X+ /*]*/ {000000,000000,0x000e,0x0008,0x0008,0x0008,0x0008,0x0008,0x000e}, X+ /*^*/ {000000,000000,000000,000000,000000,000000,0x0011,0x000a,0x0004}, X+ /*_*/ {000000,000000,0x001f,000000,000000,000000,000000,000000,000000}, X+ /*`*/ {000000,000000,000000,000000,000000,0x0008,0x0004,0x000c,0x000c}, X+ /*a*/ {000000,000000,0x001e,0x0011,0x001e,0x0010,0x000e,000000,000000}, X+ /*b*/ {000000,000000,0x000d,0x0013,0x0011,0x0013,0x000d,0x0001,0x0001}, X+ /*c*/ {000000,000000,0x000e,0x0011,0x0001,0x0011,0x000e,000000,000000}, X+ /*d*/ {000000,000000,0x0016,0x0019,0x0011,0x0019,0x0016,0x0010,0x0010}, X+ /*e*/ {000000,000000,0x000e,0x0001,0x001f,0x0011,0x000e,000000,000000}, X+ /*f*/ {000000,000000,0x0004,0x0004,0x0004,0x000e,0x0004,0x0014,0x0008}, X+ /*g*/ {0x000e,0x0011,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000}, X+ /*h*/ {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,0x0001,0x0001}, X+ /*i*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0006,000000,0x0004}, X+ /*j*/ {0x0006,0x0009,0x0008,0x0008,0x0008,0x0008,0x000c,000000,0x0008}, X+ /*k*/ {000000,000000,0x0009,0x0005,0x0003,0x0005,0x0009,0x0001,0x0001}, X+ /*l*/ {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x0006}, X+ /*m*/ {000000,000000,0x0015,0x0015,0x0015,0x0015,0x000b,000000,000000}, X+ /*n*/ {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,000000,000000}, X+ /*o*/ {000000,000000,0x000e,0x0011,0x0011,0x0011,0x000e,000000,000000}, X+ /*p*/ {0x0001,0x0001,0x000d,0x0013,0x0011,0x0013,0x000d,000000,000000}, X+ /*q*/ {0x0010,0x0010,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000}, X+ /*r*/ {000000,000000,0x0001,0x0001,0x0001,0x0013,0x000d,000000,000000}, X+ /*s*/ {000000,000000,0x000f,0x0010,0x000e,0x0001,0x001e,000000,000000}, X+ /*t*/ {000000,000000,0x0008,0x0014,0x0004,0x0004,0x001f,0x0004,0x0004}, X+ /*u*/ {000000,000000,0x0016,0x0019,0x0011,0x0011,0x0011,000000,000000}, X+ /*v*/ {000000,000000,0x0004,0x000a,0x0011,0x0011,0x0011,000000,000000}, X+ /*w*/ {000000,000000,0x000a,0x0015,0x0015,0x0011,0x0011,000000,000000}, X+ /*x*/ {000000,000000,0x0011,0x000a,0x0004,0x000a,0x0011,000000,000000}, X+ /*y*/ {0x000e,0x0010,0x001e,0x0011,0x0011,0x0011,0x0011,000000,000000}, X+ /*z*/ {000000,000000,0x001f,0x0002,0x0004,0x0008,0x001f,000000,000000}, X+ /*{*/ {000000,000000,0x0008,0x0004,0x0004,0x0002,0x0004,0x0004,0x0008}, X+ /*|*/ {000000,000000,0x0004,0x0004,0x0004,000000,0x0004,0x0004,0x0004}, X+ /*}*/ {000000,000000,0x0002,0x0004,0x0004,0x0008,0x0004,0x0004,0x0002}, X+ /*~*/ {000000,000000,000000,000000,000000,000000,0x0008,0x0015,0x0002}, X+ /*DEL*/{000000,000000,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f}, X+ }; X+ X+ /* 9x17 font, bottom row first, left pixel in lsb */ X+ char_row fnt9x17[FNT_CHARS][FNT9X17_VBITS] = { X+ /* */ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000}, X+ /*!*/ {000000,000000,000000,000000,0x0010,000000,000000,000000,0x0010, X+ 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010}, X+ /*"*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,0x0044,0x0044,0x0044,0x0044,0x0044}, X+ /*#*/ {000000,000000,000000,000000,0x0044,0x0044,0x0044,0x0044,0x01ff, X+ 0x0044,0x0044,0x0044,0x01ff,0x0044,0x0044,0x0044,0x0044}, X+ /*$*/ {000000,000000,000000,000000,0x0010,0x0010,0x007e,0x0091,0x0110, X+ 0x0090,0x007c,0x0012,0x0011,0x0112,0x00fc,0x0010,0x0010}, X+ /*%*/ {000000,000000,000000,000000,0x0080,0x0141,0x0081,0x0002,0x0004, X+ 0x0008,0x0010,0x0020,0x0040,0x0080,0x0102,0x0105,0x0002}, X+ /*&*/ {000000,000000,000000,000000,0x011c,0x00a2,0x0041,0x00c1,0x0141, X+ 0x0022,0x001c,0x0014,0x0022,0x0022,0x001c,000000,000000}, X+ /*'*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010}, X+ /*(*/ {000000,000000,000000,000000,0x0040,0x0020,0x0010,0x0008,0x0008, X+ 0x0004,0x0004,0x0004,0x0008,0x0008,0x0010,0x0020,0x0040}, X+ /*)*/ {000000,000000,000000,000000,0x0004,0x0008,0x0010,0x0020,0x0020, X+ 0x0040,0x0040,0x0040,0x0020,0x0020,0x0010,0x0008,0x0004}, X+ /***/ {000000,000000,000000,000000,0x0010,0x0010,0x0111,0x0092,0x0054, X+ 0x0038,0x01ff,0x0038,0x0054,0x0092,0x0111,0x0010,0x0010}, X+ /*+*/ {000000,000000,000000,000000,000000,000000,0x0010,0x0010,0x0010, X+ 0x0010,0x01ff,0x0010,0x0010,0x0010,0x0010,000000,000000}, X+ /*,*/ {000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000}, X+ /*-*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,0x01ff,000000,000000,000000,000000,000000,000000}, X+ /*.*/ {000000,000000,000000,000000,0x0010,0x0038,0x0010,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000}, X+ /*-/-*/{000000,000000,000000,000000,000000,000000,0x0001,0x0002,0x0004, X+ 0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,000000,000000}, X+ /*0*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0103,0x0105, X+ 0x0109,0x0111,0x0121,0x0141,0x0181,0x0101,0x0082,0x007c}, X+ /*1*/ {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010, X+ 0x0010,0x0010,0x0010,0x0010,0x0010,0x001c,0x0018,0x0010}, X+ /*2*/ {000000,000000,000000,000000,0x01ff,0x0001,0x0001,0x0001,0x0001, X+ 0x0002,0x007c,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c}, X+ /*3*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100, X+ 0x0080,0x0078,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c}, X+ /*4*/ {000000,000000,000000,000000,0x0040,0x0040,0x0040,0x0040,0x0040, X+ 0x01ff,0x0041,0x0042,0x0044,0x0048,0x0050,0x0060,0x0040}, X+ /*5*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100, X+ 0x0100,0x0080,0x007f,0x0001,0x0001,0x0001,0x0001,0x01ff}, X+ /*6*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, X+ 0x0081,0x007f,0x0001,0x0001,0x0001,0x0002,0x0084,0x0078}, X+ /*7*/ {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0002,0x0004, X+ 0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0100,0x01ff}, X+ /*8*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, X+ 0x0082,0x007c,0x0082,0x0101,0x0101,0x0101,0x0082,0x007c}, X+ /*9*/ {000000,000000,000000,000000,0x001c,0x0022,0x0040,0x0080,0x0100, X+ 0x0100,0x01fc,0x0102,0x0101,0x0101,0x0101,0x0082,0x007c}, X+ /*:*/ {000000,000000,000000,000000,000000,000000,0x0010,0x0038,0x0010, X+ 000000,000000,000000,0x0010,0x0038,0x0010,000000,000000}, X+ /*;*/ {000000,000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010, X+ 000000,000000,000000,0x0010,0x0038,0x0010,000000,000000}, X+ /*<*/ {000000,000000,000000,000000,0x0040,0x0020,0x0010,0x0008,0x0004, X+ 0x0002,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040}, X+ /*=*/ {000000,000000,000000,000000,000000,000000,000000,000000,0x01ff, X+ 000000,000000,000000,0x01ff,000000,000000,000000,000000}, X+ /*>*/ {000000,000000,000000,000000,0x0004,0x0008,0x0010,0x0020,0x0040, X+ 0x0080,0x0100,0x0080,0x0040,0x0020,0x0010,0x0008,0x0004}, X+ /*?*/ {000000,000000,000000,0x0010,0x0038,0x0010,000000,0x0010,0x0010, X+ 0x0020,0x0040,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c}, X+ /*@*/ {000000,000000,000000,000000,0x007c,0x0002,0x0001,0x01f9,0x0145, X+ 0x0145,0x0145,0x0179,0x0101,0x0101,0x0101,0x0082,0x007c}, X+ /*A*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x01ff, X+ 0x0101,0x0082,0x0082,0x0044,0x0044,0x0028,0x0028,0x0010}, X+ /*B*/ {000000,000000,000000,000000,0x007f,0x0084,0x0104,0x0104,0x0104, X+ 0x0084,0x007c,0x0084,0x0104,0x0104,0x0104,0x0084,0x007f}, X+ /*C*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0101,0x0082,0x007c}, X+ /*D*/ {000000,000000,000000,000000,0x007f,0x0084,0x0104,0x0104,0x0104, X+ 0x0104,0x0104,0x0104,0x0104,0x0104,0x0104,0x0084,0x007f}, X+ /*E*/ {000000,000000,000000,000000,0x01ff,0x0001,0x0001,0x0001,0x0001, X+ 0x0001,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x01ff}, X+ /*F*/ {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001, X+ 0x0001,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x01ff}, X+ /*G*/ {000000,000000,000000,000000,0x00fc,0x0102,0x0101,0x0101,0x0101, X+ 0x0101,0x01c1,0x0001,0x0001,0x0001,0x0001,0x0102,0x00fc}, X+ /*H*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101, X+ 0x0101,0x01ff,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101}, X+ /*I*/ {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010, X+ 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x007c}, X+ /*J*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100, X+ 0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0180}, X+ /*K*/ {000000,000000,000000,000000,0x0101,0x0081,0x0041,0x0021,0x0011, X+ 0x0009,0x0005,0x000b,0x0011,0x0021,0x0041,0x0081,0x0101}, X+ /*L*/ {000000,000000,000000,000000,0x01ff,0x0101,0x0001,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, X+ /*M*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101, X+ 0x0101,0x0111,0x0111,0x0129,0x0145,0x0145,0x0183,0x0101}, X+ /*N*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0181,0x0141, X+ 0x0141,0x0121,0x0111,0x0109,0x0105,0x0105,0x0103,0x0101}, X+ /*O*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0082,0x007c}, X+ /*P*/ {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001, X+ 0x0001,0x007f,0x0081,0x0101,0x0101,0x0101,0x0081,0x007f}, X+ /*Q*/ {000000,000000,0x0180,0x0040,0x007c,0x0092,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0082,0x007c}, X+ /*R*/ {000000,000000,000000,000000,0x0101,0x0081,0x0041,0x0021,0x0011, X+ 0x0009,0x007f,0x0081,0x0101,0x0101,0x0101,0x0081,0x007f}, X+ /*S*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100, X+ 0x0080,0x007c,0x0002,0x0001,0x0001,0x0101,0x0082,0x007c}, X+ /*T*/ {000000,000000,000000,000000,0x0038,0x0010,0x0010,0x0010,0x0010, X+ 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0111,0x01ff}, X+ /*U*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101}, X+ /*V*/ {000000,000000,000000,000000,0x0010,0x0010,0x0028,0x0028,0x0044, X+ 0x0044,0x0082,0x0082,0x0101,0x0101,0x0101,0x0101,0x0101}, X+ /*W*/ {000000,000000,000000,000000,0x0101,0x0183,0x0145,0x0145,0x0129, X+ 0x0111,0x0111,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101}, X+ /*X*/ {000000,000000,000000,000000,0x0101,0x0101,0x0082,0x0082,0x0044, X+ 0x0028,0x0010,0x0028,0x0044,0x0082,0x0082,0x0101,0x0101}, X+ /*Y*/ {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010, X+ 0x0010,0x0010,0x0028,0x0044,0x0082,0x0082,0x0101,0x0101}, X+ /*Z*/ {000000,000000,000000,000000,0x01ff,0x0001,0x0002,0x0002,0x0004, X+ 0x0008,0x0010,0x0020,0x0040,0x0080,0x0080,0x0100,0x01ff}, X+ /*[*/ {000000,000000,000000,000000,0x007c,0x0004,0x0004,0x0004,0x0004, X+ 0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x007c}, X+ /*\*/ {000000,000000,000000,000000,000000,000000,0x0100,0x0080,0x0040, X+ 0x0020,0x0010,0x0008,0x0004,0x0002,0x0001,000000,000000}, X+ /*]*/ {000000,000000,000000,000000,0x007c,0x0040,0x0040,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x007c}, X+ /*^*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,0x0101,0x0082,0x0044,0x0028,0x0010}, X+ /*_*/ {000000,000000,000000,000000,0x01ff,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000}, X+ /*`*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,0x0020,0x0010,0x0008,0x000c,0x001c,0x0008}, X+ /*a*/ {000000,000000,000000,000000,0x03fc,0x0102,0x0101,0x0102,0x01fc, X+ 0x0100,0x0100,0x0080,0x007c,000000,000000,000000,000000}, X+ /*b*/ {000000,000000,000000,000000,0x007d,0x0083,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0083,0x007d,0x0001,0x0001,0x0001,0x0001}, X+ /*c*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0001,0x0001, X+ 0x0001,0x0101,0x0082,0x007c,000000,000000,000000,000000}, X+ /*d*/ {000000,000000,000000,000000,0x017c,0x0182,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0182,0x017c,0x0100,0x0100,0x0100,0x0100}, X+ /*e*/ {000000,000000,000000,000000,0x007c,0x0002,0x0001,0x0001,0x01ff, X+ 0x0101,0x0101,0x0082,0x007c,000000,000000,000000,000000}, X+ /*f*/ {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010, X+ 0x0010,0x007c,0x0010,0x0010,0x0010,0x0110,0x00a0,0x0040}, X+ /*g*/ {0x007c,0x0082,0x0101,0x0100,0x017c,0x0182,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0182,0x017c,000000,000000,000000,000000}, X+ /*h*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101, X+ 0x0103,0x0103,0x0085,0x0079,0x0001,0x0001,0x0001,0x0001}, X+ /*i*/ {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010, X+ 0x0010,0x0010,0x0018,000000,000000,0x0018,0x0018,000000}, X+ /*j*/ {0x003c,0x0042,0x0081,0x0080,0x0080,0x0080,0x0080,0x0080,0x0080, X+ 0x0080,0x0080,0x00c0,000000,000000,0x00c0,0x00c0,000000}, X+ /*k*/ {000000,000000,000000,000000,0x0082,0x0042,0x0022,0x0012,0x000a, X+ 0x0016,0x0022,0x0042,0x0002,0x0002,0x0002,0x0002,0x0002}, X+ /*l*/ {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010, X+ 0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x001c}, X+ /*m*/ {000000,000000,000000,000000,0x0111,0x0111,0x0111,0x0111,0x0111, X+ 0x0111,0x0111,0x00ab,0x0045,000000,000000,000000,000000}, X+ /*n*/ {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0083,0x007d,000000,000000,000000,000000}, X+ /*o*/ {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0082,0x007c,000000,000000,000000,000000}, X+ /*p*/ {0x0001,0x0001,0x0001,0x0001,0x007d,0x0003,0x0081,0x0101,0x0101, X+ 0x0101,0x0101,0x0083,0x007d,000000,000000,000000,000000}, X+ /*q*/ {0x0100,0x0100,0x0100,0x0100,0x017c,0x0182,0x0101,0x0101,0x0101, X+ 0x0101,0x0101,0x0182,0x017c,000000,000000,000000,000000}, X+ /*r*/ {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001, X+ 0x0001,0x0103,0x0085,0x0079,000000,000000,000000,000000}, X+ /*s*/ {000000,000000,000000,000000,0x007e,0x0081,0x0100,0x0080,0x007c, X+ 0x0002,0x0001,0x0102,0x00fc,000000,000000,000000,000000}, X+ /*t*/ {000000,000000,000000,000000,0x0040,0x00a0,0x0110,0x0010,0x0010, X+ 0x0010,0x0010,0x0010,0x00fe,0x0010,0x0010,0x0010,0x0010}, X+ /*u*/ {000000,000000,000000,000000,0x013c,0x0142,0x0181,0x0101,0x0101, X+ 0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000}, X+ /*v*/ {000000,000000,000000,000000,0x0010,0x0028,0x0044,0x0082,0x0101, X+ 0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000}, X+ /*w*/ {000000,000000,000000,000000,0x0044,0x00aa,0x0111,0x0111,0x0101, X+ 0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000}, X+ /*x*/ {000000,000000,000000,000000,0x0101,0x0082,0x0044,0x0028,0x0010, X+ 0x0028,0x0044,0x0082,0x0101,000000,000000,000000,000000}, X+ /*y*/ {0x007c,0x0082,0x0101,0x0100,0x0100,0x01fc,0x0102,0x0101,0x0101, X+ 0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000}, X+ /*z*/ {000000,000000,000000,000000,0x01ff,0x0002,0x0004,0x0008,0x0010, X+ 0x0020,0x0040,0x0080,0x01ff,000000,000000,000000,000000}, X+ /*{*/ {000000,000000,000000,000000,0x00c0,0x0020,0x0010,0x0010,0x0010, X+ 0x0008,0x0004,0x0008,0x0010,0x0010,0x0010,0x0020,0x00c0}, X+ /*|*/ {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010, X+ 000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010}, X+ /*}*/ {000000,000000,000000,000000,0x0006,0x0008,0x0010,0x0010,0x0010, X+ 0x0020,0x0040,0x0020,0x0010,0x0010,0x0010,0x0008,0x0006}, X+ /*~*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,0x0040,0x00a0,0x0111,0x000a,0x0004}, X+ /*DEL*/{000000,000000,000000,000000,0x0155,000000,0x0155,000000,0x0155, X+ 000000,0x0155,000000,0x0155,000000,0x0155,000000,0x0155}, X+ }; X+ X+ /* 13x25 font, bottom row first, left pixel in lsb */ X+ char_row fnt13x25[FNT_CHARS][FNT13X25_VBITS] = { X+ /* */ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000}, X+ /*!*/ {000000,000000,000000,000000,000000,0x00e0,0x00e0,0x00e0,000000, X+ 000000,000000,0x0040,0x0040,0x0040,0x0040,0x0040,0x00e0,0x00e0, X+ 0x00e0,0x00e0,0x00e0,0x00e0,0x00e0,0x00e0,0x0040}, X+ /*"*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 0x0208,0x0208,0x0208,0x0208,0x0208,0x0208,0x0208}, X+ /*#*/ {000000,000000,000000,000000,000000,000000,0x0208,0x0208,0x0208, X+ 0x0208,0x0208,0x0208,0x1fff,0x0208,0x0208,0x0208,0x0208,0x0208, X+ 0x1fff,0x0208,0x0208,0x0208,0x0208,0x0208,0x0208}, X+ /*$*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, X+ 0x03f8,0x0444,0x0842,0x0840,0x0840,0x0440,0x03f8,0x0044,0x0042, X+ 0x0042,0x0842,0x0444,0x03f8,0x0040,0x0040,0x0040}, X+ /*%*/ {000000,000000,000000,000000,000000,000000,0x0c00,0x1200,0x1201, X+ 0x0c01,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, X+ 0x0200,0x0400,0x0800,0x1006,0x1009,0x0009,0x0006}, X+ /*&*/ {000000,000000,000000,000000,000000,000000,0x1078,0x1084,0x0902, X+ 0x0601,0x0601,0x0901,0x1081,0x0042,0x0024,0x0018,0x0018,0x0024, X+ 0x0042,0x0042,0x0042,0x0042,0x0024,0x0018,000000}, X+ /*'*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,0x0001,0x0002,0x0004,0x0008, X+ 0x0010,0x0030,0x0078,0x0078,0x0078,0x0030,000000}, X+ /*(*/ {000000,000000,000000,000000,000000,000000,0x0080,0x0040,0x0020, X+ 0x0020,0x0010,0x0008,0x0008,0x0004,0x0004,0x0004,0x0004,0x0004, X+ 0x0008,0x0008,0x0010,0x0020,0x0020,0x0040,0x0080}, X+ /*)*/ {000000,000000,000000,000000,000000,000000,0x0020,0x0040,0x0080, X+ 0x0080,0x0100,0x0200,0x0200,0x0400,0x0400,0x0400,0x0400,0x0400, X+ 0x0200,0x0200,0x0100,0x0080,0x0080,0x0040,0x0020}, X+ /***/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, X+ 0x1041,0x0842,0x0444,0x0248,0x0150,0x00e0,0x1fff,0x00e0,0x0150, X+ 0x0248,0x0444,0x0842,0x1041,0x0040,0x0040,0x0040}, X+ /*+*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x1fff,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,000000,000000,000000}, X+ /*,*/ {000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0030,0x0078, X+ 0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000}, X+ /*-*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,0x1fff,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000}, X+ /*.*/ {000000,000000,000000,000000,000000,000000,000000,0x0038,0x007c, X+ 0x007c,0x007c,0x0038,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000}, X+ /*-/-*/{000000,000000,000000,000000,000000,000000,000000,000000,0x0001, X+ 0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, X+ 0x0200,0x0400,0x0800,0x1000,0x1000,000000,000000}, X+ /*0*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1003,0x1005,0x1009,0x1011,0x1021,0x1041,0x1081,0x1101, X+ 0x1201,0x1401,0x1801,0x1001,0x0802,0x0404,0x03f8}, X+ /*1*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0048,0x0070,0x0060,0x0040}, X+ /*2*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0002,0x03fc,0x0400,0x0800,0x1000, X+ 0x1000,0x1000,0x1000,0x1001,0x0802,0x0404,0x03f8}, X+ /*3*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1000,0x1000,0x1000,0x0800,0x0400,0x03e0,0x0400,0x0800, X+ 0x1000,0x1000,0x1000,0x1001,0x0802,0x0404,0x03f8}, X+ /*4*/ {000000,000000,000000,000000,000000,000000,0x0200,0x0200,0x0200, X+ 0x0200,0x0200,0x0200,0x0200,0x1fff,0x0201,0x0201,0x0202,0x0204, X+ 0x0208,0x0210,0x0220,0x0240,0x0280,0x0300,0x0200}, X+ /*5*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1000,0x1000,0x1000,0x1000,0x1000,0x0800,0x0400,0x03ff, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff}, X+ /*6*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff,0x0001,0x0001, X+ 0x0001,0x0001,0x0002,0x0004,0x0808,0x0410,0x03e0}, X+ /*7*/ {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001, X+ 0x0002,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, X+ 0x0200,0x0400,0x0800,0x0800,0x1000,0x1000,0x1fff}, X+ /*8*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8,0x0404,0x0802, X+ 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, X+ /*9*/ {000000,000000,000000,000000,000000,000000,0x00f8,0x0104,0x0202, X+ 0x0400,0x0800,0x1000,0x1000,0x1000,0x1000,0x1ff8,0x1004,0x1002, X+ 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, X+ /*:*/ {000000,000000,000000,000000,000000,000000,000000,000000,0x0030, X+ 0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000, X+ 0x0030,0x0078,0x0078,0x0030,000000,000000,000000}, X+ /*;*/ {000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0030,0x0078, X+ 0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000, X+ 0x0030,0x0078,0x0078,0x0030,000000,000000,000000}, X+ /*<*/ {000000,000000,000000,000000,000000,000000,0x0200,0x0100,0x0080, X+ 0x0040,0x0020,0x0010,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004, X+ 0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200}, X+ /*=*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,0x1fff,000000,000000,000000,000000,000000, X+ 0x1fff,000000,000000,000000,000000,000000,000000}, X+ /*>*/ {000000,000000,000000,000000,000000,000000,0x0008,0x0010,0x0020, X+ 0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,0x1000,0x0800,0x0400, X+ 0x0200,0x0100,0x0080,0x0040,0x0020,0x0010,0x0008}, X+ /*?*/ {000000,000000,000000,000000,000000,0x0040,0x00e0,0x0040,000000, X+ 000000,000000,0x0040,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800, X+ 0x1000,0x1000,0x1001,0x1001,0x0802,0x0404,0x03f8}, X+ /*@*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0002, X+ 0x0001,0x0001,0x0ee1,0x1111,0x1111,0x1111,0x1111,0x1111,0x12e1, X+ 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, X+ /*A*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1fff,0x1001,0x1001,0x1001,0x1001,0x0802, X+ 0x0802,0x0404,0x0208,0x0110,0x00a0,0x00a0,0x0040}, X+ /*B*/ {000000,000000,000000,000000,000000,000000,0x03ff,0x0408,0x0808, X+ 0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03f8,0x0408,0x0808, X+ 0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03ff}, X+ /*C*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,0x03f8}, X+ /*D*/ {000000,000000,000000,000000,000000,000000,0x03ff,0x0408,0x0808, X+ 0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008, X+ 0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03ff}, X+ /*E*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x007f,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff}, X+ /*F*/ {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x007f,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff}, X+ /*G*/ {000000,000000,000000,000000,000000,000000,0x0ff8,0x1004,0x1002, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1f01,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0002,0x1004,0x0ff8}, X+ /*H*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1fff,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001}, X+ /*I*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x03f8}, X+ /*J*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000, X+ 0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1e00}, X+ /*K*/ {000000,000000,000000,000000,000000,000000,0x1001,0x0801,0x0401, X+ 0x0201,0x0101,0x0081,0x0041,0x0021,0x0011,0x000f,0x0009,0x0011, X+ 0x0021,0x0041,0x0081,0x0101,0x0201,0x0401,0x0801}, X+ /*L*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x1001,0x1001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, X+ /*M*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1041,0x1041,0x10a1, X+ 0x10a1,0x1111,0x1209,0x1209,0x1405,0x1803,0x1001}, X+ /*N*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, X+ 0x1001,0x1801,0x1401,0x1201,0x1201,0x1101,0x1081,0x1041,0x1041, X+ 0x1021,0x1011,0x1009,0x1009,0x1005,0x1003,0x1001}, X+ /*O*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, X+ /*P*/ {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x03ff,0x0401,0x0801, X+ 0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff}, X+ /*Q*/ {000000,000000,000000,000000,0x0c00,0x0200,0x03f8,0x0494,0x0862, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8}, X+ /*R*/ {000000,000000,000000,000000,000000,000000,0x1001,0x0801,0x0401, X+ 0x0201,0x0101,0x0081,0x0041,0x0021,0x0011,0x03ff,0x0401,0x0801, X+ 0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff}, X+ /*S*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1000,0x1000,0x1000,0x0800,0x0400,0x03f8,0x0004,0x0002, X+ 0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,0x03f8}, X+ /*T*/ {000000,000000,000000,000000,000000,000000,0x00e0,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x1041,0x1fff}, X+ /*U*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001}, X+ /*V*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x00a0, X+ 0x00a0,0x0110,0x0110,0x0208,0x0208,0x0404,0x0404,0x0802,0x0802, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001}, X+ /*W*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1803, X+ 0x1405,0x1405,0x1209,0x1209,0x1111,0x1111,0x10a1,0x1041,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001}, X+ /*X*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, X+ 0x0802,0x0802,0x0404,0x0208,0x0110,0x00a0,0x0040,0x00a0,0x0110, X+ 0x0208,0x0404,0x0802,0x0802,0x1001,0x1001,0x1001}, X+ /*Y*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x00a0,0x0110,0x0208, X+ 0x0404,0x0802,0x0802,0x1001,0x1001,0x1001,0x1001}, X+ /*Z*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001, X+ 0x0002,0x0004,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, X+ 0x0200,0x0400,0x0400,0x0800,0x1000,0x1000,0x1fff}, X+ /*[*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0008,0x0008, X+ 0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008, X+ 0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x03f8}, X+ /*\*/ {000000,000000,000000,000000,000000,000000,000000,000000,0x1000, X+ 0x1000,0x0800,0x0400,0x0200,0x0100,0x0080,0x0040,0x0020,0x0010, X+ 0x0008,0x0004,0x0002,0x0001,0x0001,000000,000000}, X+ /*]*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0200,0x0200, X+ 0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200, X+ 0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x03f8}, X+ /*^*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 0x1001,0x0802,0x0404,0x0208,0x0110,0x00a0,0x0040}, X+ /*_*/ {000000,000000,000000,000000,000000,000000,0x1fff,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000}, X+ /*`*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,0x0400,0x0200,0x0100,0x0080, X+ 0x0040,0x0060,0x00f0,0x00f0,0x00f0,0x0060,000000}, X+ /*a*/ {000000,000000,000000,000000,000000,000000,0x17f8,0x0804,0x0802, X+ 0x0802,0x0802,0x0804,0x0ff8,0x0800,0x0800,0x0800,0x0800,0x0404, X+ 0x03f8,000000,000000,000000,000000,000000,000000}, X+ /*b*/ {000000,000000,000000,000000,000000,000000,0x03f9,0x0405,0x0803, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405, X+ 0x03f9,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, X+ /*c*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1001,0x0802,0x0404, X+ 0x03f8,000000,000000,000000,000000,000000,000000}, X+ /*d*/ {000000,000000,000000,000000,000000,000000,0x13f8,0x1404,0x1802, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404, X+ 0x13f8,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000}, X+ /*e*/ {000000,000000,000000,000000,000000,000000,0x0ff8,0x0004,0x0002, X+ 0x0001,0x0001,0x0001,0x1fff,0x1001,0x1001,0x1001,0x0802,0x0404, X+ 0x03f8,000000,000000,000000,000000,000000,000000}, X+ /*f*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x03f8,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x1040,0x0880,0x0500,0x0200}, X+ /*g*/ {0x03f8,0x0404,0x0802,0x1001,0x1000,0x1000,0x13f8,0x1404,0x1802, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404, X+ 0x13f8,000000,000000,000000,000000,000000,000000}, X+ /*h*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405, X+ 0x03f9,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001}, X+ /*i*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0070, X+ 000000,000000,000000,0x00e0,0x00e0,0x00e0,000000}, X+ /*j*/ {0x00f0,0x0108,0x0204,0x0402,0x0400,0x0400,0x0400,0x0400,0x0400, X+ 0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0700, X+ 000000,000000,000000,0x0700,0x0700,0x0700,000000}, X+ /*k*/ {000000,000000,000000,000000,000000,000000,0x0804,0x0404,0x0204, X+ 0x0104,0x0084,0x0044,0x0024,0x0014,0x002c,0x0044,0x0084,0x0104, X+ 0x0204,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004}, X+ /*l*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0070}, X+ /*m*/ {000000,000000,000000,000000,000000,000000,0x1041,0x1041,0x1041, X+ 0x1041,0x1041,0x1041,0x1041,0x1041,0x1041,0x1041,0x08a3,0x0515, X+ 0x0209,000000,000000,000000,000000,000000,000000}, X+ /*n*/ {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405, X+ 0x03f9,000000,000000,000000,000000,000000,000000}, X+ /*o*/ {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0802,0x0404, X+ 0x03f8,000000,000000,000000,000000,000000,000000}, X+ /*p*/ {0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x03f9,0x0405,0x0803, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405, X+ 0x03f9,000000,000000,000000,000000,000000,000000}, X+ /*q*/ {0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x13f8,0x1404,0x1802, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404, X+ 0x13f8,000000,000000,000000,000000,000000,000000}, X+ /*r*/ {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001, X+ 0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1001,0x0803,0x0405, X+ 0x03f9,000000,000000,000000,000000,000000,000000}, X+ /*s*/ {000000,000000,000000,000000,000000,000000,0x03fc,0x0402,0x0800, X+ 0x0800,0x0800,0x0400,0x03f8,0x0004,0x0002,0x0002,0x0002,0x0804, X+ 0x07f8,000000,000000,000000,000000,000000,000000}, X+ /*t*/ {000000,000000,000000,000000,000000,000000,0x0200,0x0500,0x0880, X+ 0x1040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040, X+ 0x07fc,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040}, X+ /*u*/ {000000,000000,000000,000000,000000,000000,0x13f8,0x1404,0x1802, X+ 0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, X+ 0x1001,000000,000000,000000,000000,000000,000000}, X+ /*v*/ {000000,000000,000000,000000,000000,000000,0x0040,0x00a0,0x0110, X+ 0x0208,0x0404,0x0802,0x0802,0x1001,0x1001,0x1001,0x1001,0x1001, X+ 0x1001,000000,000000,000000,000000,000000,000000}, X+ /*w*/ {000000,000000,000000,000000,000000,000000,0x0208,0x0514,0x08a2, X+ 0x08a2,0x1041,0x1041,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, X+ 0x1001,000000,000000,000000,000000,000000,000000}, X+ /*x*/ {000000,000000,000000,000000,000000,000000,0x1001,0x0802,0x0404, X+ 0x0208,0x0110,0x00a0,0x0040,0x00a0,0x0110,0x0208,0x0404,0x0802, X+ 0x1001,000000,000000,000000,000000,000000,000000}, X+ /*y*/ {0x03f8,0x0404,0x0802,0x1001,0x1000,0x1000,0x1000,0x1000,0x1ff8, X+ 0x1004,0x1002,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001, X+ 0x1001,000000,000000,000000,000000,000000,000000}, X+ /*z*/ {000000,000000,000000,000000,000000,000000,0x1fff,0x0002,0x0004, X+ 0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800, X+ 0x1fff,000000,000000,000000,000000,000000,000000}, X+ /*{*/ {000000,000000,000000,000000,000000,000000,0x0600,0x0100,0x0080, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0020,0x0010,0x0020,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0080,0x0100,0x0600}, X+ /*|*/ {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,000000,000000,000000,000000,000000, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040}, X+ /*}*/ {000000,000000,000000,000000,000000,000000,0x000c,0x0010,0x0020, X+ 0x0040,0x0040,0x0040,0x0040,0x0040,0x0080,0x0100,0x0080,0x0040, X+ 0x0040,0x0040,0x0040,0x0040,0x0020,0x0010,0x000c}, X+ /*~*/ {000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 000000,000000,000000,000000,000000,000000,000000,000000,000000, X+ 0x0600,0x0900,0x1080,0x1041,0x0021,0x0012,0x000c}, X+ /*DEL*/{000000,000000,000000,000000,000000,000000,0x1249,000000,000000, X+ 0x1249,000000,000000,0x1249,000000,000000,0x1249,000000,000000, X+ 0x1249,000000,000000,0x1249,000000,000000,0x1249}, X+ }; X+ X+ /* X+ ** The plotting area is defined as a huge bitmap. X+ ** The bitmap is stored in a dynamically allocated pixel array b_p X+ ** X+ ** The bitmap is allocated (and initialized to zero) with X+ ** b_makebitmap(xsize, ysize, planes) X+ ** and freed with b_freebitmap() X+ ** xsize and ysize will be rounded up to a multiple of 8. X+ ** X+ ** Valid (int) coordinates range from zero to (xsize-1,ysize-1) X+ ** X+ ** Plotting is done via b_move(x, y) and b_vector(x, y) functions, X+ ** where the point (x,y) is the target to go from the current point X+ ** To set the color use b_setvalue(value) where value is the value X+ ** (0 or 1 or a color number) to be stored in every pixel. X+ ** To get dotted line styles, use b_setlinetype(linetype). X+ ** X+ ** Internally all plotting goes through b_setpixel(x, y, value). X+ */ X+ X+ X+ /* X+ ** set pixel (x, y, value) to value value (this can be 1/0 or a color number). X+ */ X+ void X+ b_setpixel(x, y, value) X+ unsigned int x, y, value; X+ { X+ register unsigned int row; X+ register unsigned char mask; X+ int i; X+ if (b_rastermode) { X+ /* interchange so that new (x,y) is old (y,b_ysize-1-x) */ X+ row = x; /* temp storage */ X+ x = y; X+ y = b_ysize-1-row; X+ } X+ if (IN(x, b_xsize) && IN(y, b_ysize)) X+ { X+ row = y/8; X+ mask = 1<<(y%8); X+ X+ for (i=0; i<b_planes; i++) { X+ if (value&1) X+ *((*b_p)[row]+x) |= mask; X+ else X+ *((*b_p)[row]+x) &= ~mask; X+ row += b_psize; X+ value >>= 1; X+ } X+ } X+ #ifdef BITMAPDEBUG X+ else X+ { X+ if (b_rastermode) X+ fprintf(stderr, "Warning: setpixel(%d, %d, %d) out of bounds\n", X+ b_ysize-1-y, x, value); X+ else X+ fprintf(stderr, "Warning: setpixel(%d, %d, %d) out of bounds\n", X+ x, y, value); X+ } X+ #endif X+ } X+ X+ /* X+ ** get pixel (x,y) value----unused X+ */ X+ /**************************** X+ unsigned int X+ b_getpixel(x, y) X+ unsigned int x, y; X+ { X+ register unsigned int row; X+ register unsigned char mask; X+ register unsigned char value; X+ int i; X+ X+ if (b_rastermode) { X+ row = x; X+ x = y; X+ y = b_ysize-1-row; X+ } X+ if (IN(x, b_xsize) && IN(y, b_ysize)) X+ { X+ row = y/8 + (b_planes-1)*b_psize; X+ mask = 1<<(y%8); X+ X+ for (i=0; i<b_planes; i++) { X+ if ( *((*b_p)[row]+x) & mask ) X+ value |= 1; X+ row -= b_psize; X+ value <<= 1; X+ } X+ return(value); X+ } X+ else X+ { X+ #ifdef BITMAPDEBUG X+ if (b_rastermode) X+ fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n", X+ b_ysize-1-y, x); X+ else X+ fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n", x, y); X+ #endif X+ return(0); X+ } X+ } X+ ********************************/ X+ X+ /* X+ ** allocate the bitmap X+ */ X+ void X+ b_makebitmap(x, y, planes) X+ unsigned int x, y, planes; X+ { X+ register unsigned j; X+ unsigned rows; X+ X+ x = 8 * (unsigned int)(x/8.0+0.9); /* round up to multiple of 8 */ X+ y = 8 * (unsigned int)(y/8.0+0.9); /* round up to multiple of 8 */ X+ b_psize = y/8; /* size of each plane */ X+ rows = b_psize * planes; /* total number of rows of 8 pixels high */ X+ b_xsize = x; b_ysize = y; X+ b_currx = b_curry = 0; X+ b_planes = planes; X+ b_value = 1; X+ b_angle = 0; X+ b_rastermode = 0; X+ /* allocate row pointers */ X+ b_p = (bitmap *)alloc( rows * sizeof(pixels *), "bitmap row buffer"); X+ bzero(b_p, rows * sizeof(pixels *)); X+ for (j = 0; j < rows; j++) { X+ /* allocate bitmap buffers */ X+ (*b_p)[j] = (pixels *)alloc(x * sizeof(pixels),(char *)NULL); X+ if ((*b_p)[j] == (pixels *)NULL) { X+ b_freebitmap(); /* free what we have already allocated */ X+ int_error("out of memory for bitmap buffer", NO_CARET); X+ } X+ bzero((*b_p)[j], x * sizeof(pixels)); X+ } X+ } X+ X+ /* X+ ** free the allocated bitmap X+ */ X+ void X+ b_freebitmap() X+ { X+ int j; X+ unsigned rows; X+ X+ rows = b_psize * b_planes; /* total number of rows of 8 pixels high */ X+ for (j = 0; j < rows; j++) X+ { X+ (void) free((char *)(*b_p)[j]); X+ } X+ (void) free((char *)b_p); X+ b_p = (bitmap *)(NULL); X+ } X+ X+ /* X+ ** set pixel at (x,y) with color b_value and dotted mask b_linemask. X+ */ X+ void X+ b_setmaskpixel(x,y,value) X+ unsigned int x,y,value; X+ { X+ /* dotted line generator */ X+ if ((b_linemask>>b_maskcount)&(unsigned int)(1)) { X+ b_setpixel(x,y,value); X+ } X+ b_maskcount= (b_maskcount+1) % 16; X+ b_lastx= x; /* last pixel set with mask */ X+ b_lasty= y; X+ } X+ X+ /* X+ ** draw a line from (x1,y1) to (x2,y2) X+ ** with color b_value and dotted mask b_linemask. X+ */ X+ void X+ b_line(x1,y1,x2,y2) X+ unsigned int x1,y1,x2,y2; X+ { X+ int runcount; X+ int dx,dy; X+ int xinc,yinc; X+ unsigned int xplot,yplot; X+ X+ runcount=0; X+ dx = abs((int)(x1)-(int)(x2)); X+ if (x2>x1) xinc= 1; X+ if (x2==x1) xinc= 0; X+ if (x2<x1) xinc= -1; X+ dy = abs((int)(y1)-(int)(y2)); X+ if (y2>y1) yinc= 1; X+ if (y2==y1) yinc= 0; X+ if (y2<y1) yinc= -1; X+ xplot=x1; X+ yplot=y1; X+ if (dx>dy) { X+ /* iterate x */ X+ if ( (b_linemask==0xffff) || X+ ((xplot!=b_lastx) && (yplot!=b_lasty)) ) X+ b_setmaskpixel(xplot,yplot,b_value); X+ while (xplot!=x2) { X+ xplot+=xinc; X+ runcount+=dy; X+ if (runcount>=(dx-runcount)) { X+ yplot+=yinc; X+ runcount-=dx; X+ } X+ b_setmaskpixel(xplot,yplot,b_value); X+ } X+ } else { X+ /* iterate y */ X+ if ( (b_linemask==0xffff) || X+ ((xplot!=b_lastx) && (yplot!=b_lasty)) ) X+ b_setmaskpixel(xplot,yplot,b_value); X+ while (yplot!=y2) { X+ yplot+=yinc; X+ runcount+=dx; X+ if (runcount>=(dy-runcount)) { X+ xplot+=xinc; X+ runcount-=dy; X+ } X+ b_setmaskpixel(xplot,yplot,b_value); X+ } X+ } X+ } X+ X+ /* X+ ** set character size X+ */ X+ void X+ b_charsize(size) X+ unsigned int size; X+ { X+ int j; X+ switch(size) { X+ case FNT5X9: X+ b_hchar = FNT5X9_HCHAR; X+ b_hbits = FNT5X9_HBITS; X+ b_vchar = FNT5X9_VCHAR; X+ b_vbits = FNT5X9_VBITS; X+ for (j = 0; j < FNT_CHARS; j++ ) X+ b_font[j] = &fnt5x9[j][0]; X+ break; X+ case FNT9X17: X+ b_hchar = FNT9X17_HCHAR; X+ b_hbits = FNT9X17_HBITS; X+ b_vchar = FNT9X17_VCHAR; X+ b_vbits = FNT9X17_VBITS; X+ for (j = 0; j < FNT_CHARS; j++ ) X+ b_font[j] = &fnt9x17[j][0]; X+ break; X+ case FNT13X25: X+ b_hchar = FNT13X25_HCHAR; X+ b_hbits = FNT13X25_HBITS; X+ b_vchar = FNT13X25_VCHAR; X+ b_vbits = FNT13X25_VBITS; X+ for (j = 0; j < FNT_CHARS; j++ ) X+ b_font[j] = &fnt13x25[j][0]; X+ break; X+ default: X+ int_error("Unknown character size",NO_CARET); X+ } X+ } X+ X+ X+ /* X+ ** put characater c at (x,y) rotated by angle with color b_value. X+ */ X+ void X+ b_putc(x,y,c,angle) X+ unsigned int x,y; X+ char c; X+ unsigned int angle; X+ { X+ unsigned int i, j, k; X+ char_row fc; X+ X+ j = c - ' '; X+ for ( i = 0; i < b_vbits; i++ ) { X+ fc = *( b_font[j] + i ); X+ if ( c == '_' ) { /* treat underline specially */ X+ if ( fc ) { /* this this the underline row ? *? X+ /* draw the under line for the full h_char width */ X+ for ( k = ( b_hbits - b_hchar )/2; X+ k < ( b_hbits + b_hchar )/2; k++ ) { X+ switch(angle) { X+ case 0 : b_setpixel(x+k+1,y+i,b_value); X+ break; X+ case 1 : b_setpixel(x-i,y+k+1,b_value); X+ break; X+ } X+ } X+ } X+ } X+ else { X+ /* draw character */ X+ for ( k = 0; k < b_hbits; k++ ) { X+ if ( ( fc >> k ) & 1 ) { X+ switch(angle) { X+ case 0 : b_setpixel(x+k+1,y+i,b_value); X+ break; X+ case 1 : b_setpixel(x-i,y+k+1,b_value); X+ break; X+ } X+ } X+ } X+ } X+ } X+ } X+ X+ X+ /* X+ ** set b_linemask to b_pattern[linetype] X+ */ X+ int X+ b_setlinetype(linetype) X+ int linetype; X+ { X+ if (linetype>=7) X+ linetype %= 7; X+ b_linemask = b_pattern[linetype+2]; X+ b_maskcount=0; X+ } X+ X+ /* X+ ** set b_value to value X+ */ X+ void X+ b_setvalue(value) X+ unsigned int value; X+ { X+ b_value = value; X+ } X+ X+ /* X+ ** move to (x,y) X+ */ X+ int X+ b_move(x, y) X+ unsigned int x, y; X+ { X+ b_currx = x; X+ b_curry = y; X+ } X+ X+ /* X+ ** draw to (x,y) with color b_value X+ */ X+ int X+ b_vector(x, y) X+ unsigned int x, y; X+ { X+ b_line(b_currx, b_curry, x, y); X+ b_currx = x; X+ b_curry = y; X+ } X+ X+ X+ /* X+ ** put text str at (x,y) with color b_value and rotation b_angle X+ */ X+ int X+ b_put_text(x,y,str) X+ unsigned int x, y; X+ char *str; X+ { X+ if (b_angle == 1) X+ x += b_vchar/2; X+ else X+ y -= b_vchar/2; X+ switch (b_angle) { X+ case 0: X+ for (; *str; ++str, x += b_hchar) X+ b_putc (x, y, *str, b_angle); X+ break; X+ case 1: X+ for (; *str; ++str, y += b_hchar) X+ b_putc (x, y, *str, b_angle); X+ break; X+ } X+ } X+ X+ X+ int X+ b_text_angle(ang) X+ int ang; X+ { X+ b_angle=(unsigned int)ang; X+ return TRUE; X+ } Xdiff -cr ./bitmap.h ../gnuplot2.02/bitmap.h X*** ./bitmap.h Mon Dec 3 15:32:34 1990 X--- ../gnuplot2.02/bitmap.h Thu Dec 6 16:08:01 1990 X*************** X*** 0 X X--- 1,68 ----- X+ /* bitmap.h */ X+ X+ /* allow up to 16 bit width for character array */ X+ typedef unsigned int char_row; X+ typedef char_row * char_box; X+ X+ #define FNT_CHARS 96 /* Number of characters in the font set */ X+ X+ #define FNT5X9 0 X+ #define FNT5X9_VCHAR 11 /* vertical spacing between characters */ X+ #define FNT5X9_VBITS 9 /* actual number of rows of bits per char */ X+ #define FNT5X9_HCHAR 7 /* horizontal spacing between characters */ X+ #define FNT5X9_HBITS 5 /* actual number of bits per row per char */ X+ extern char_row fnt5x9[FNT_CHARS][FNT5X9_VBITS]; X+ X+ #define FNT9X17 1 X+ #define FNT9X17_VCHAR 21 /* vertical spacing between characters */ X+ #define FNT9X17_VBITS 17 /* actual number of rows of bits per char */ X+ #define FNT9X17_HCHAR 13 /* horizontal spacing between characters */ X+ #define FNT9X17_HBITS 9 /* actual number of bits per row per char */ X+ extern char_row fnt9x17[FNT_CHARS][FNT9X17_VBITS]; X+ X+ #define FNT13X25 2 X+ #define FNT13X25_VCHAR 31 /* vertical spacing between characters */ X+ #define FNT13X25_VBITS 25 /* actual number of rows of bits per char */ X+ #define FNT13X25_HCHAR 19 /* horizontal spacing between characters */ X+ #define FNT13X25_HBITS 13 /* actual number of bits per row per char */ X+ extern char_row fnt13x25[FNT_CHARS][FNT13X25_VBITS]; X+ X+ X+ typedef unsigned char pixels; /* the type of one set of 8 pixels in bitmap */ X+ typedef pixels *bitmap[]; /* the bitmap */ X+ X+ extern bitmap *b_p; /* global pointer to bitmap */ X+ extern unsigned int b_currx, b_curry; /* the current coordinates */ X+ extern unsigned int b_xsize, b_ysize; /* the size of the bitmap */ X+ extern unsigned int b_planes; /* number of color planes */ X+ extern unsigned int b_psize; /* size of each plane */ X+ extern unsigned int b_rastermode; /* raster mode rotates -90deg */ X+ extern unsigned int b_linemask; /* 16 bit mask for dotted lines */ X+ extern unsigned int b_value; /* colour of lines */ X+ extern unsigned int b_hchar; /* width of characters */ X+ extern unsigned int b_hbits; /* actual bits in char horizontally */ X+ extern unsigned int b_vchar; /* height of characters */ X+ extern unsigned int b_vbits; /* actual bits in char vertically */ X+ extern unsigned int b_angle; /* rotation of text */ X+ extern char_box b_font[FNT_CHARS]; /* the current font */ X+ extern unsigned int b_pattern[]; X+ extern int b_maskcount; X+ extern unsigned int b_lastx, b_lasty; /* last pixel set - used by b_line */ X+ X+ X+ extern void b_makebitmap(); X+ extern void b_freebitmap(); X+ extern void b_setpixel(); X+ extern unsigned int b_getpixel(); X+ extern void b_line(); X+ extern void b_setmaskpixel(); X+ extern void b_putc(); X+ extern void b_charsize(); X+ extern void b_setvalue(); X+ X+ extern int b_setlinetype(); X+ extern int b_move(); X+ extern int b_vector(); X+ extern int b_put_text(); X+ extern int b_text_angle(); X+ END_OF_patch2b if test 56728 -ne `wc -c <patch2b`; then echo shar: \"patch2b\" unpacked with wrong size! fi # end of overwriting check fi echo shar: End of shell archive. exit 0 exit 0 # Just in case... -- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM Sterling Software, IMD UUCP: uunet!sparky!kent Phone: (402) 291-8300 FAX: (402) 291-4362 Please send comp.sources.misc-related mail to kent@uunet.uu.net.