version 1.1, 2000/01/09 17:00:49 |
version 1.1.1.3, 2003/09/15 07:09:24 |
Line 678 char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS] = { |
|
Line 678 char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS] = { |
|
0x1249,000000,000000,0x1249,000000,000000,0x1249}, |
0x1249,000000,000000,0x1249,000000,000000,0x1249}, |
}; |
}; |
|
|
|
/* Moved here from gif.trm */ |
|
struct rgb web_color_rgbs[] = |
|
{ |
|
{ 0xff, 0xff, 0xff }, /* background: white */ |
|
{ 0x00, 0x00, 0x00 }, /* borders: black */ |
|
{ 0xa0, 0xa0, 0xa0 }, /* x & y axes: grey */ |
|
{ 0xff, 0x00, 0x00 }, /* color 01: red */ |
|
{ 0x00, 0xc0, 0x00 }, /* color 02: dark green */ |
|
{ 0x00, 0x80, 0xff }, /* color 03: dark blue */ |
|
{ 0xc0, 0x00, 0xff }, /* color 04: dark magenta */ |
|
{ 0xc0, 0xff, 0x40 }, /* color 05: yellow */ |
|
{ 0xc0, 0x40, 0x00 }, /* color 06: orange */ |
|
{ 0x40, 0xff, 0x80 }, /* color 07: sea green */ |
|
{ 0x20, 0x20, 0xc0 }, /* color 08: royal blue */ |
|
{ 0x80, 0x00, 0xc0 }, /* color 09: dark violet */ |
|
/* please note: these colors are optimized for web216 compatibility */ |
|
{ 0x00, 0x60, 0x80 }, /* DeepSkyBlue4 */ |
|
{ 0x00, 0x80, 0x00 }, /* green4 */ |
|
{ 0x00, 0x80, 0x40 }, /* SpringGreen4 */ |
|
{ 0x00, 0x80, 0x80 }, /* dark cyan, turquoise4 */ |
|
{ 0x00, 0xc0, 0x60 }, /* SpringGreen3 */ |
|
{ 0x00, 0xc0, 0xc0 }, /* cyan3, turquoise3 */ |
|
{ 0x00, 0xff, 0x00 }, /* green */ |
|
{ 0x20, 0x80, 0x20 }, /* forest green */ |
|
{ 0x30, 0x60, 0x80 }, /* SteelBlue4 */ |
|
{ 0x40, 0x40, 0x40 }, /* grey25-31 */ |
|
{ 0x40, 0x80, 0x00 }, /* chartreuse4 */ |
|
{ 0x00, 0x00, 0x80 }, /* dark blue, navy blue */ |
|
{ 0x80, 0x60, 0x00 }, /* DarkGoldenrod4 */ |
|
{ 0x80, 0x60, 0x10 }, /* goldenrod4 */ |
|
{ 0x80, 0x60, 0x60 }, /* pink4 */ |
|
{ 0x80, 0x60, 0x80 }, /* plum4 */ |
|
{ 0x00, 0x00, 0xc0 }, /* medium blue */ |
|
{ 0x00, 0x00, 0xff }, /* blue */ |
|
{ 0x00, 0x60, 0x00 }, /* dark green */ |
|
{ 0x40, 0xc0, 0x80 }, /* SeaGreen3 */ |
|
{ 0x60, 0xa0, 0xc0 }, /* SkyBlue3 */ |
|
{ 0x60, 0xc0, 0x00 }, /* chartreuse3 */ |
|
{ 0x60, 0xc0, 0xa0 }, /* medium aquamarine */ |
|
{ 0x80, 0x00, 0x00 }, /* dark red */ |
|
{ 0x80, 0x00, 0x80 }, /* dark magenta */ |
|
{ 0x60, 0x20, 0x80 }, /* DarkOrchid4 */ |
|
{ 0x60, 0x60, 0x60 }, /* dim grey */ |
|
{ 0x00, 0xff, 0xff }, /* cyan1, turquoise1 */ |
|
{ 0x20, 0x20, 0x20 }, /* grey13-18 */ |
|
{ 0x20, 0x40, 0x40 }, /* dark slate grey */ |
|
{ 0x20, 0x40, 0x80 }, /* RoyalBlue4 */ |
|
{ 0x60, 0x80, 0x20 }, /* olive drab */ |
|
{ 0x60, 0x80, 0x60 }, /* DarkSeaGreen4 */ |
|
{ 0x60, 0x80, 0x80 }, /* LightBlue4, PaleTurquoise4 */ |
|
{ 0x80, 0x80, 0x40 }, /* LightGoldenrod4, khaki4 */ |
|
{ 0x80, 0x80, 0x80 }, /* grey51-56 */ |
|
{ 0xa0, 0xa0, 0xa0 }, /* dark grey, grey63-68 */ |
|
{ 0xa0, 0xd0, 0xe0 }, /* light blue */ |
|
{ 0xc0, 0x20, 0x20 }, /* firebrick3 */ |
|
{ 0xc0, 0x60, 0x00 }, /* DarkOrange3 */ |
|
{ 0x80, 0xc0, 0xe0 }, /* sky blue */ |
|
{ 0xc0, 0x60, 0xc0 }, /* orchid3 */ |
|
{ 0xc0, 0x80, 0x00 }, /* orange3 */ |
|
{ 0xc0, 0x80, 0x60 }, /* LightSalmon3 */ |
|
{ 0xff, 0x40, 0x00 }, /* orange red */ |
|
{ 0xff, 0x40, 0x40 }, /* brown1, tomato */ |
|
{ 0x80, 0xc0, 0xff }, /* light sky blue */ |
|
{ 0xff, 0x80, 0x60 }, /* salmon */ |
|
{ 0xff, 0x80, 0x80 }, /* light coral */ |
|
{ 0xc0, 0xa0, 0x00 }, /* gold3 */ |
|
{ 0xc0, 0xc0, 0xc0 }, /* grey76-81, honeydew3, ivory3, snow3 */ |
|
{ 0xc0, 0xff, 0xc0 }, /* DarkSeaGreen1 */ |
|
{ 0xff, 0x00, 0x00 }, /* red */ |
|
{ 0xff, 0x00, 0xff }, /* magenta */ |
|
{ 0xff, 0x80, 0xa0 }, /* PaleVioletRed1 */ |
|
{ 0xff, 0x80, 0xff }, /* orchid1 */ |
|
{ 0xc0, 0xc0, 0xa0 }, /* LemonChiffon3 */ |
|
{ 0xff, 0x60, 0x60 }, /* IndianRed1 */ |
|
{ 0xff, 0x80, 0x00 }, /* dark orange */ |
|
{ 0xff, 0xa0, 0x00 }, /* orange */ |
|
{ 0x80, 0xe0, 0xe0 }, /* CadetBlue2, DarkSlateGray2 */ |
|
{ 0xa0, 0xe0, 0xe0 }, /* pale turquoise */ |
|
{ 0xa0, 0xff, 0x20 }, /* green yellow */ |
|
{ 0xc0, 0x00, 0x00 }, /* red3 */ |
|
{ 0xc0, 0x00, 0xc0 }, /* magenta3 */ |
|
{ 0xa0, 0x20, 0x20 }, /* brown */ |
|
{ 0xa0, 0x20, 0xff }, /* purple */ |
|
{ 0x80, 0x20, 0x00 }, /* OrangeRed4 */ |
|
{ 0x80, 0x20, 0x20 }, /* brown4 */ |
|
{ 0x80, 0x40, 0x00 }, /* DarkOrange4 */ |
|
{ 0x80, 0x40, 0x20 }, /* sienna4 */ |
|
{ 0x80, 0x40, 0x80 }, /* orchid4 */ |
|
{ 0x80, 0x60, 0xc0 }, /* MediumPurple3 */ |
|
{ 0x80, 0x60, 0xff }, /* SlateBlue1 */ |
|
{ 0x80, 0x80, 0x00 }, /* yellow4 */ |
|
{ 0xa0, 0x80, 0xff }, /* MediumPurple1 */ |
|
{ 0xc0, 0x60, 0x80 }, /* PaleVioletRed3 */ |
|
{ 0xc0, 0xc0, 0x00 }, /* yellow3 */ |
|
{ 0xff, 0x80, 0x40 }, /* sienna1 */ |
|
{ 0xff, 0xa0, 0x40 }, /* tan1 */ |
|
{ 0xff, 0xa0, 0x60 }, /* sandy brown */ |
|
{ 0xff, 0xa0, 0x70 }, /* light salmon */ |
|
{ 0xff, 0xc0, 0x20 }, /* goldenrod1 */ |
|
{ 0xff, 0xc0, 0xc0 }, /* RosyBrown1, pink */ |
|
{ 0xff, 0xff, 0x00 }, /* yellow */ |
|
{ 0xff, 0xff, 0x80 }, /* khaki1 */ |
|
{ 0xff, 0xff, 0xc0 } /* lemon chiffon */ |
|
}; |
|
|
/* |
/* |
** The plotting area is defined as a huge bitmap. |
** The plotting area is defined as a huge bitmap. |
Line 742 unsigned int x, y, value; |
|
Line 846 unsigned int x, y, value; |
|
} |
} |
|
|
|
|
/* Currently unused */ |
|
#if 0 |
|
/* |
/* |
* get pixel (x,y) value |
* get pixel (x,y) value |
*/ |
*/ |
Line 753 unsigned int x, y; |
|
Line 855 unsigned int x, y; |
|
{ |
{ |
register unsigned int row; |
register unsigned int row; |
register unsigned char mask; |
register unsigned char mask; |
register unsigned char value; |
register unsigned char value = 0; |
int i; |
int i; |
|
|
if (b_rastermode) { |
if (b_rastermode) { |
Line 772 unsigned int x, y; |
|
Line 874 unsigned int x, y; |
|
row -= b_psize; |
row -= b_psize; |
value <<= 1; |
value <<= 1; |
} |
} |
return(value); |
/* HBB 991123: the missing '>>1' was the 'every second color' problem |
} |
* with PNG in 3.8a...*/ |
else |
return(value>>1); |
{ |
} else { |
#ifdef BITMAPDEBUG |
#ifdef BITMAPDEBUG |
if (b_rastermode) |
if (b_rastermode) |
fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n", |
fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n", |
Line 786 unsigned int x, y; |
|
Line 888 unsigned int x, y; |
|
return(0); |
return(0); |
} |
} |
} |
} |
#endif /* 0 */ |
|
|
|
|
|
/* |
/* |
Line 810 unsigned int x, y, planes; |
|
Line 911 unsigned int x, y, planes; |
|
b_angle = 0; |
b_angle = 0; |
b_rastermode = 0; |
b_rastermode = 0; |
/* allocate row pointers */ |
/* allocate row pointers */ |
b_p = (bitmap *) gp_alloc((unsigned long) rows * sizeof(pixels *), "bitmap row buffer"); |
b_p = (bitmap *) gp_alloc(rows * sizeof(pixels *), "bitmap row buffer"); |
memset(b_p, 0, rows * sizeof(pixels *)); |
memset(b_p, 0, rows * sizeof(pixels *)); |
for (j = 0; j < rows; j++) { |
for (j = 0; j < rows; j++) { |
/* allocate bitmap buffers */ |
/* allocate bitmap buffers */ |
(*b_p)[j] = (pixels *) gp_alloc((unsigned long) x * sizeof(pixels), (char *) NULL); |
(*b_p)[j] = (pixels *) gp_alloc(x * sizeof(pixels), (char *) NULL); |
if ((*b_p)[j] == (pixels *) NULL) { |
if ((*b_p)[j] == (pixels *) NULL) { |
b_freebitmap(); /* free what we have already allocated */ |
b_freebitmap(); /* free what we have already allocated */ |
int_error("out of memory for bitmap buffer", NO_CARET); |
int_error("out of memory for bitmap buffer", NO_CARET); |