summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-01-01 13:11:29 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-01-01 13:11:29 +0000
commitf9770db21fabc7785627092c52afb0d88f43089f (patch)
tree7b48f59252190d4c24b8b67cee8ccac66ca4f987 /src
parent988bc9d95f1a4f5b06262fe9b4de9466ab2950f5 (diff)
Use rint() for some more rounding of vertices.
Add fl_parse_color() to X11 version, too, and use it instead of XParseColor in the image handling code. Move the default color stuff in the plastic scheme to the MacOS get_system_colors(), and apply the background color to the tile image. More fixes for test makefile. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1901 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Chart.cxx36
-rw-r--r--src/Fl_File_Icon2.cxx15
-rw-r--r--src/Fl_Pixmap.cxx22
-rw-r--r--src/Fl_get_system_colors.cxx99
-rw-r--r--src/fl_draw_pixmap.cxx45
-rw-r--r--src/fl_vertex.cxx12
-rw-r--r--src/tile.xpm11
7 files changed, 125 insertions, 115 deletions
diff --git a/src/Fl_Chart.cxx b/src/Fl_Chart.cxx
index 7b50ecd12..5ca226418 100644
--- a/src/Fl_Chart.cxx
+++ b/src/Fl_Chart.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Chart.cxx,v 1.5.2.6.2.3 2001/12/11 16:03:12 easysw Exp $"
+// "$Id: Fl_Chart.cxx,v 1.5.2.6.2.4 2002/01/01 13:11:29 easysw Exp $"
//
// Forms-compatible chart widget for the Fast Light Tool Kit (FLTK).
//
@@ -53,9 +53,9 @@ static void draw_barchart(int x,int y,int w,int h,
incr = (h - lh + min*incr)/(max-min);
zeroh = int(y+h-lh);
} else {
- zeroh = int(y+h+min * incr + .5);
+ zeroh = (int)rint(y+h+min * incr);
}
- int bwidth = int(w/double(autosize?numb:maxnumb)+.5);
+ int bwidth = (int)rint(w/double(autosize?numb:maxnumb));
/* Draw base line */
fl_color(textcolor);
fl_line(x, zeroh, x+w, zeroh);
@@ -63,7 +63,7 @@ static void draw_barchart(int x,int y,int w,int h,
int i;
/* Draw the bars */
for (i=0; i<numb; i++) {
- int h = int(entries[i].val*incr+.5);
+ int h = (int)rint(entries[i].val*incr);
if (h < 0)
fl_rectbound(x+i*bwidth,zeroh,bwidth+1,-h+1, (Fl_Color)entries[i].col);
else if (h > 0)
@@ -98,18 +98,18 @@ static void draw_horbarchart(int x,int y,int w,int h,
else incr = w/(max-min);
if ( (-min*incr) < lw) {
incr = (w - lw + min*incr)/(max-min);
- zeroh = x+int(lw+.5);
+ zeroh = x+(int)rint(lw);
} else {
- zeroh = int(x-min * incr + .5);
+ zeroh = (int)rint(x-min * incr);
}
- int bwidth = int(h/double(autosize?numb:maxnumb)+.5);
+ int bwidth = (int)rint(h/double(autosize?numb:maxnumb));
/* Draw base line */
fl_color(textcolor);
fl_line(zeroh, y, zeroh, y+h);
if (min == 0.0 && max == 0.0) return; /* Nothing else to draw */
/* Draw the bars */
for (i=0; i<numb; i++) {
- int w = int(entries[i].val*incr+.5);
+ int w = (int)rint(entries[i].val*incr);
if (w > 0)
fl_rectbound(zeroh,y+i*bwidth,w+1,bwidth+1, (Fl_Color)entries[i].col);
else if (w < 0)
@@ -135,14 +135,14 @@ static void draw_linechart(int type, int x,int y,int w,int h,
double incr;
if (max == min) incr = h-2.0*lh;
else incr = (h-2.0*lh)/ (max-min);
- int zeroh = int(y+h-lh+min * incr + .5);
+ int zeroh = (int)rint(y+h-lh+min * incr);
double bwidth = w/double(autosize?numb:maxnumb);
/* Draw the values */
for (i=0; i<numb; i++) {
- int x0 = x + int((i-.5)*bwidth+.5);
- int x1 = x + int((i+.5)*bwidth+.5);
- int y0 = i ? zeroh - int(entries[i-1].val*incr+.5) : 0;
- int y1 = zeroh - int(entries[i].val*incr+.5);
+ int x0 = x + (int)rint((i-.5)*bwidth);
+ int x1 = x + (int)rint((i+.5)*bwidth);
+ int y0 = i ? zeroh - (int)rint(entries[i-1].val*incr) : 0;
+ int y1 = zeroh - (int)rint(entries[i].val*incr);
if (type == FL_SPIKE_CHART) {
fl_color((Fl_Color)entries[i].col);
fl_line(x1, zeroh, x1, y1);
@@ -153,7 +153,7 @@ static void draw_linechart(int type, int x,int y,int w,int h,
fl_color((Fl_Color)entries[i-1].col);
if ((entries[i-1].val>0.0)!=(entries[i].val>0.0)) {
double ttt = entries[i-1].val/(entries[i-1].val-entries[i].val);
- int xt = x + int((i-.5+ttt)*bwidth+.5);
+ int xt = x + (int)rint((i-.5+ttt)*bwidth);
fl_polygon(x0,zeroh, x0,y0, xt,zeroh);
fl_polygon(xt,zeroh, x1,y1, x1,zeroh);
} else {
@@ -169,7 +169,7 @@ static void draw_linechart(int type, int x,int y,int w,int h,
/* Draw the labels */
for (i=0; i<numb; i++)
fl_draw(entries[i].str,
- x+int((i+.5)*bwidth+.5), zeroh - int(entries[i].val*incr+.5),0,0,
+ x+(int)rint((i+.5)*bwidth), zeroh - (int)rint(entries[i].val*incr),0,0,
entries[i].val>=0 ? FL_ALIGN_BOTTOM : FL_ALIGN_TOP);
}
@@ -220,8 +220,8 @@ static void draw_piechart(int x,int y,int w,int h,
/* draw the label */
double xl = txc + 1.1*rad*cos(ARCINC*curang);
fl_draw(entries[i].str,
- int(xl+.5),
- int(tyc - 1.1*rad*sin(ARCINC*curang)+.5),
+ (int)rint(xl),
+ (int)rint(tyc - 1.1*rad*sin(ARCINC*curang)),
0, 0,
xl<txc ? FL_ALIGN_RIGHT : FL_ALIGN_LEFT);
curang += 0.5 * incr * entries[i].val;
@@ -378,5 +378,5 @@ void Fl_Chart::maxsize(int m) {
}
//
-// End of "$Id: Fl_Chart.cxx,v 1.5.2.6.2.3 2001/12/11 16:03:12 easysw Exp $".
+// End of "$Id: Fl_Chart.cxx,v 1.5.2.6.2.4 2002/01/01 13:11:29 easysw Exp $".
//
diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx
index 6be309468..789885dcf 100644
--- a/src/Fl_File_Icon2.cxx
+++ b/src/Fl_File_Icon2.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Icon2.cxx,v 1.1.2.8 2001/12/17 14:27:03 easysw Exp $"
+// "$Id: Fl_File_Icon2.cxx,v 1.1.2.9 2002/01/01 13:11:29 easysw Exp $"
//
// Fl_File_Icon system icon routines.
//
@@ -40,6 +40,7 @@
#include "flstring.h"
#include <ctype.h>
#include <errno.h>
+#include <FL/math.h>
#include <sys/types.h>
#include <sys/stat.h>
#if defined(WIN32) && ! defined(__CYGWIN__)
@@ -299,7 +300,7 @@ Fl_File_Icon::load_fti(const char *fti) // I - File to read from
if (sscanf(params, "%f,%f", &x, &y) != 2)
break;
- add_vertex((short)(x * 100.0 + 0.5), (short)(y * 100.0 + 0.5));
+ add_vertex((short)(int)rint(x * 100.0), (short)(int)rint(y * 100.0));
}
else
{
@@ -313,9 +314,9 @@ Fl_File_Icon::load_fti(const char *fti) // I - File to read from
fclose(fp);
#ifdef DEBUG
- printf("Icon File \"%s\":\n", fti);
+ p(int)rintf("Icon File \"%s\":\n", fti);
for (int i = 0; i < num_data_; i ++)
- printf(" %d,\n", data_[i]);
+ p(int)rintf(" %d,\n", data_[i]);
#endif /* DEBUG */
return 0;
@@ -559,9 +560,9 @@ Fl_File_Icon::load_image(const char *ifile) // I - File to read from
img->release();
#ifdef DEBUG
- printf("Icon File \"%s\":\n", xpm);
+ p(int)rintf("Icon File \"%s\":\n", xpm);
for (i = 0; i < num_data_; i ++)
- printf(" %d,\n", data_[i]);
+ p(int)rintf(" %d,\n", data_[i]);
#endif // DEBUG
return 0;
@@ -930,5 +931,5 @@ get_kde_val(char *str,
//
-// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.8 2001/12/17 14:27:03 easysw Exp $".
+// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.9 2002/01/01 13:11:29 easysw Exp $".
//
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index e7fbd9b4f..7146c5e36 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.12 2001/12/21 20:45:43 easysw Exp $"
+// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.13 2002/01/01 13:11:29 easysw Exp $"
//
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -365,16 +365,7 @@ void Fl_Pixmap::color_average(Fl_Color c, float i) {
while (*p && !isspace(*p)) p++;
}
-#if defined(WIN32) || defined(__APPLE__)
if (fl_parse_color(p, r, g, b)) {
-#else
- XColor x;
- if (XParseColor(fl_display, fl_colormap, p, &x)) {
- r = x.red>>8;
- g = x.green>>8;
- b = x.blue>>8;
-#endif
-
r = (ia * r + ir) >> 8;
g = (ia * g + ig) >> 8;
b = (ia * b + ib) >> 8;
@@ -460,16 +451,7 @@ void Fl_Pixmap::desaturate() {
while (*p && !isspace(*p)) p++;
}
-#if defined(WIN32) || defined(__APPLE__)
if (fl_parse_color(p, r, g, b)) {
-#else
- XColor x;
- if (XParseColor(fl_display, fl_colormap, p, &x)) {
- r = x.red>>8;
- g = x.green>>8;
- b = x.blue>>8;
-#endif
-
g = (r * 31 + g * 61 + b * 8) / 100;
if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", data()[i + 1][0],
@@ -485,5 +467,5 @@ void Fl_Pixmap::desaturate() {
}
//
-// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.12 2001/12/21 20:45:43 easysw Exp $".
+// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.13 2002/01/01 13:11:29 easysw Exp $".
//
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index a2b47c3e7..5e86fc23e 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.3 2001/12/20 14:41:44 easysw Exp $"
+// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.4 2002/01/01 13:11:29 easysw Exp $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@@ -28,6 +28,7 @@
#include <FL/x.H>
#include <FL/math.h>
#include "flstring.h"
+#include <stdio.h>
#include <stdlib.h>
#include <FL/Fl_Pixmap.H>
#include <FL/Fl_Tiled_Image.H>
@@ -94,6 +95,18 @@ int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b) {
r = R; g = G; b = B;
return 1;
}
+#else
+// Wrapper around XParseColor...
+int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b) {
+ XColor x;
+ if (!fl_display) fl_open_display();
+ if (XParseColor(fl_display, fl_colormap, p, &x)) {
+ r = x.red>>8;
+ g = x.green>>8;
+ b = x.blue>>8;
+ return 1;
+ } else return 0;
+}
#endif // WIN32 || __APPLE__
#if defined(WIN32)
@@ -122,12 +135,17 @@ void Fl::get_system_colors() {
#elif defined(__APPLE__)
// MacOS X currently supports two color schemes - Blue and Graphite.
// Since we aren't emulating the Aqua interface (even if Apple would
-// let us), we can stick with the defaults that FLTK has traditionally
-// used... The Fl::scheme("plastic") color/box scheme provides a
-// usable Aqua-like look-n-feel...
+// let us), we use some defaults that are similar to both. The
+// Fl::scheme("plastic") color/box scheme provides a usable Aqua-like
+// look-n-feel...
void Fl::get_system_colors()
{
fl_open_display();
+
+ foreground(0, 0, 0);
+ background(0xe0, 0xe0, 0xe0);
+ background2(0xf0, 0xf0, 0xf0);
+ set_selection_color(0x80, 0x80, 0x80);
}
#else
@@ -219,25 +237,40 @@ int Fl::reload_scheme() {
get_system_colors();
if (scheme_ && !strcasecmp(scheme_, "plastic")) {
- // Load plastic buttons, etc...
+ // Update the tile image to match the background color...
+ uchar r, g, b;
+
+ get_color(FL_GRAY, r, g, b);
+ sprintf(tile_cmap[0], "O c #%02x%02x%02x", r, g, b);
+ sprintf(tile_cmap[1], "o c #%02x%02x%02x", 0xe0 * (int)r / 0xf0,
+ 0xe0 * (int)g / 0xf0, 0xe0 * (int)b / 0xf0);
+ sprintf(tile_cmap[2], ". c #%02x%02x%02x", 0xd8 * (int)r / 0xf0,
+ 0xd8 * (int)g / 0xf0, 0xd8 * (int)b / 0xf0);
+
+ if (tile.id) {
+ fl_delete_offscreen(tile.id);
+ tile.id = 0;
+ }
+
+ if (tile.mask) {
+ fl_delete_bitmask(tile.mask);
+ tile.mask = 0;
+ }
+
if (!scheme_bg_) scheme_bg_ = new Fl_Tiled_Image(&tile, Fl::w(), Fl::h());
- Fl::foreground(0, 0, 0);
- Fl::background(0xe0, 0xe0, 0xe0);
- Fl::background2(0xf0, 0xf0, 0xf0);
- set_selection_color(0x80, 0x80, 0x80);
-
- Fl::set_boxtype(FL_UP_FRAME, FL_PLASTIC_UP_FRAME);
- Fl::set_boxtype(FL_DOWN_FRAME, FL_PLASTIC_DOWN_FRAME);
- Fl::set_boxtype(FL_THIN_UP_FRAME, FL_PLASTIC_UP_FRAME);
- Fl::set_boxtype(FL_THIN_DOWN_FRAME, FL_PLASTIC_DOWN_FRAME);
-
- Fl::set_boxtype(FL_UP_BOX, FL_PLASTIC_UP_BOX);
- Fl::set_boxtype(FL_DOWN_BOX, FL_PLASTIC_DOWN_BOX);
- Fl::set_boxtype(FL_THIN_UP_BOX, FL_PLASTIC_UP_BOX);
- Fl::set_boxtype(FL_THIN_DOWN_BOX, FL_PLASTIC_DOWN_BOX);
- Fl::set_boxtype(_FL_ROUND_UP_BOX, FL_PLASTIC_UP_BOX);
- Fl::set_boxtype(_FL_ROUND_DOWN_BOX, FL_PLASTIC_UP_BOX);
+ // Load plastic buttons, etc...
+ set_boxtype(FL_UP_FRAME, FL_PLASTIC_UP_FRAME);
+ set_boxtype(FL_DOWN_FRAME, FL_PLASTIC_DOWN_FRAME);
+ set_boxtype(FL_THIN_UP_FRAME, FL_PLASTIC_UP_FRAME);
+ set_boxtype(FL_THIN_DOWN_FRAME, FL_PLASTIC_DOWN_FRAME);
+
+ set_boxtype(FL_UP_BOX, FL_PLASTIC_UP_BOX);
+ set_boxtype(FL_DOWN_BOX, FL_PLASTIC_DOWN_BOX);
+ set_boxtype(FL_THIN_UP_BOX, FL_PLASTIC_UP_BOX);
+ set_boxtype(FL_THIN_DOWN_BOX, FL_PLASTIC_DOWN_BOX);
+ set_boxtype(_FL_ROUND_UP_BOX, FL_PLASTIC_UP_BOX);
+ set_boxtype(_FL_ROUND_DOWN_BOX, FL_PLASTIC_UP_BOX);
} else {
// Use the standard FLTK look-n-feel...
if (scheme_bg_) {
@@ -245,17 +278,17 @@ int Fl::reload_scheme() {
scheme_bg_ = (Fl_Image *)0;
}
- Fl::set_boxtype(FL_UP_FRAME, fl_up_frame, D1, D1, D2, D2);
- Fl::set_boxtype(FL_DOWN_FRAME, fl_down_frame, D1, D1, D2, D2);
- Fl::set_boxtype(FL_THIN_UP_FRAME, fl_thin_up_frame, 1, 1, 2, 2);
- Fl::set_boxtype(FL_THIN_DOWN_FRAME, fl_thin_down_frame, 1, 1, 2, 2);
-
- Fl::set_boxtype(FL_UP_BOX, fl_up_box, D1, D1, D2, D2);
- Fl::set_boxtype(FL_DOWN_BOX, fl_down_box, D1, D1, D2, D2);
- Fl::set_boxtype(FL_THIN_UP_BOX, fl_thin_up_box, 1, 1, 2, 2);
- Fl::set_boxtype(FL_THIN_DOWN_BOX, fl_thin_down_box, 1, 1, 2, 2);
- Fl::set_boxtype(_FL_ROUND_UP_BOX, fl_round_up_box, 3, 3, 6, 6);
- Fl::set_boxtype(_FL_ROUND_DOWN_BOX, fl_round_down_box, 3, 3, 6, 6);
+ set_boxtype(FL_UP_FRAME, fl_up_frame, D1, D1, D2, D2);
+ set_boxtype(FL_DOWN_FRAME, fl_down_frame, D1, D1, D2, D2);
+ set_boxtype(FL_THIN_UP_FRAME, fl_thin_up_frame, 1, 1, 2, 2);
+ set_boxtype(FL_THIN_DOWN_FRAME, fl_thin_down_frame, 1, 1, 2, 2);
+
+ set_boxtype(FL_UP_BOX, fl_up_box, D1, D1, D2, D2);
+ set_boxtype(FL_DOWN_BOX, fl_down_box, D1, D1, D2, D2);
+ set_boxtype(FL_THIN_UP_BOX, fl_thin_up_box, 1, 1, 2, 2);
+ set_boxtype(FL_THIN_DOWN_BOX, fl_thin_down_box, 1, 1, 2, 2);
+ set_boxtype(_FL_ROUND_UP_BOX, fl_round_up_box, 3, 3, 6, 6);
+ set_boxtype(_FL_ROUND_DOWN_BOX, fl_round_down_box, 3, 3, 6, 6);
}
// Set (or clear) the background tile for all windows...
@@ -271,5 +304,5 @@ int Fl::reload_scheme() {
//
-// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.3 2001/12/20 14:41:44 easysw Exp $".
+// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.4 2002/01/01 13:11:29 easysw Exp $".
//
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx
index f2fdd5768..55d706151 100644
--- a/src/fl_draw_pixmap.cxx
+++ b/src/fl_draw_pixmap.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.5 2001/12/03 18:29:49 easysw Exp $"
+// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.6 2002/01/01 13:11:29 easysw Exp $"
//
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -72,11 +72,11 @@ static void cb1(void*v, int x, int y, int w, uchar* buf) {
const uchar* p = d.data[y]+x;
U64* q = (U64*)buf;
for (int X=(w+1)/2; X--; p += 2) {
-#if WORDS_BIGENDIAN
+# if WORDS_BIGENDIAN
*q++ = (d.colors[p[0]]<<32) | d.colors[p[1]];
-#else
+# else
*q++ = (d.colors[p[1]]<<32) | d.colors[p[0]];
-#endif
+# endif
}
}
@@ -90,11 +90,11 @@ static void cb2(void*v, int x, int y, int w, uchar* buf) {
int index = *p++;
U64* colors1 = d.byte1[*p++];
int index1 = *p++;
-#if WORDS_BIGENDIAN
+# if WORDS_BIGENDIAN
*q++ = (colors[index]<<32) | colors1[index1];
-#else
+# else
*q++ = (colors1[index1]<<32) | colors[index];
-#endif
+# endif
}
}
@@ -131,11 +131,6 @@ static void cb2(void*v, int x, int y, int w, uchar* buf) {
#endif
-#if defined(WIN32) || defined(__APPLE__)
-// this is in Fl_arg.cxx:
-extern int fl_parse_color(const char*, uchar&, uchar&, uchar&);
-#endif
-
uchar **fl_mask_bitmap; // if non-zero, create bitmap and store pointer here
int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color bg) {
@@ -157,9 +152,9 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
uchar* c = (uchar*)&d.colors[' '];
#ifdef U64
*(U64*)c = 0;
-#if WORDS_BIGENDIAN
+# if WORDS_BIGENDIAN
c += 4;
-#endif
+# endif
#endif
transparent_index = ' ';
Fl::get_color(bg, c[0], c[1], c[2]); c[3] = 0;
@@ -171,9 +166,9 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
uchar* c = (uchar*)&d.colors[*p++];
#ifdef U64
*(U64*)c = 0;
-#if WORDS_BIGENDIAN
+# if WORDS_BIGENDIAN
c += 4;
-#endif
+# endif
#endif
*c++ = *p++;
*c++ = *p++;
@@ -214,19 +209,13 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
}
#ifdef U64
*(U64*)c = 0;
-#if WORDS_BIGENDIAN
+# if WORDS_BIGENDIAN
c += 4;
+# endif
#endif
-#endif
-#if defined(WIN32) || defined(__APPLE__)
- if (fl_parse_color((const char*)p, c[0], c[1], c[2])) {;
-#else
- XColor x;
- if (XParseColor(fl_display, fl_colormap, (const char*)p, &x)) {
- c[0] = x.red>>8; c[1] = x.green>>8; c[2] = x.blue>>8;
-#endif
- } else { // assume "None" or "#transparent" for any errors
- // this should be transparent...
+ if (!fl_parse_color((const char*)p, c[0], c[1], c[2])) {
+ // assume "None" or "#transparent" for any errors
+ // "bg" should be transparent...
Fl::get_color(bg, c[0], c[1], c[2]);
transparent_index = index;
}
@@ -273,5 +262,5 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) {
}
//
-// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.5 2001/12/03 18:29:49 easysw Exp $".
+// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.6 2002/01/01 13:11:29 easysw Exp $".
//
diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx
index fbd80525c..2a1cc5b29 100644
--- a/src/fl_vertex.cxx
+++ b/src/fl_vertex.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_vertex.cxx,v 1.5.2.3.2.3 2001/12/28 21:57:41 easysw Exp $"
+// "$Id: fl_vertex.cxx,v 1.5.2.3.2.4 2002/01/01 13:11:29 easysw Exp $"
//
// Portable drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -228,10 +228,10 @@ void fl_circle(double x, double y,double r) {
double yt = fl_transform_y(x,y);
double rx = r * (m.c ? sqrt(m.a*m.a+m.c*m.c) : fabs(m.a));
double ry = r * (m.b ? sqrt(m.b*m.b+m.d*m.d) : fabs(m.d));
- int llx = int(xt-rx+.5);
- int w = int(xt+rx+.5)-llx;
- int lly = int(yt-ry+.5);
- int h = int(yt+ry+.5)-lly;
+ int llx = (int)rint(xt-rx);
+ int w = (int)rint(xt+rx)-llx;
+ int lly = (int)rint(yt-ry);
+ int h = (int)rint(yt+ry)-lly;
#ifdef WIN32
if (what==POLYGON) {
SelectObject(fl_gc, fl_brush());
@@ -248,5 +248,5 @@ void fl_circle(double x, double y,double r) {
}
//
-// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.3 2001/12/28 21:57:41 easysw Exp $".
+// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.4 2002/01/01 13:11:29 easysw Exp $".
//
diff --git a/src/tile.xpm b/src/tile.xpm
index d5c9c6e34..5ef010ac3 100644
--- a/src/tile.xpm
+++ b/src/tile.xpm
@@ -1,9 +1,14 @@
/* XPM */
+static char tile_cmap[3][32] = {
+"O c #F0F0F0",
+"o c #E0E0E0",
+". c #D8D8D8"
+};
static const char * tile_xpm[] = {
"16 16 3 1",
-"O c #F0F0F0",
-"o c #E0E0E0",
-". c #D8D8D8",
+tile_cmap[0],
+tile_cmap[1],
+tile_cmap[2],
"OOOOOOOOOOOOOOOO",
"oooooooooooooooo",
"................",