diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-19 01:06:45 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-19 01:06:45 +0000 |
| commit | 1acc39c5d8d5b3db88abfd008699dadb8aade2b9 (patch) | |
| tree | c35a486fc713b48c85286ce42291aa88e6652e7e /src/fl_draw_pixmap.cxx | |
| parent | 681ded73c20af217254a8dfb7838b612b17b126c (diff) | |
OK, lots of changes to the Fl_Image, Fl_Bitmap, Fl_Pixmap, and Fl_RGB_Image
classes: new copy(), copy(w,h), desaturate(), color_average(), and
inactive() methods, alloc_xyz member for copied data, etc.
Updated test programs to use inactive() and copy() methods to create
inactive images for the test buttons, plus the inactive button to toggle
it...
Added start of separate image classes, a la 2.0, for various image formats.
FLUID will also be updated for it...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1703 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_draw_pixmap.cxx')
| -rw-r--r-- | src/fl_draw_pixmap.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx index 37fed65c9..853078d69 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.1 2001/11/18 20:52:28 easysw Exp $" +// "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.2 2001/11/19 01:06:45 easysw Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // @@ -48,7 +48,7 @@ int fl_measure_pixmap(/*const*/ char* const* data, int &w, int &h) { } int fl_measure_pixmap(const char * const *data, int &w, int &h) { - int i = sscanf(data[0],"%d %d %d %d",&w,&h,&ncolors,&chars_per_pixel); + int i = sscanf(data[0],"%d%d%d%d",&w,&h,&ncolors,&chars_per_pixel); if (i<4 || w<=0 || h<=0 || chars_per_pixel!=1 && chars_per_pixel!=2) return w=0; return 1; @@ -203,7 +203,8 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) { // look for "c word", or last word if none: const uchar *previous_word = p; for (;;) { - while (*p && isspace(*p)) p++; uchar what = *p++; + while (*p && isspace(*p)) p++; + uchar what = *p++; while (*p && !isspace(*p)) p++; while (*p && isspace(*p)) p++; if (!*p) {p = previous_word; break;} @@ -224,7 +225,7 @@ int fl_draw_pixmap(const char*const* di, int x, int y, Fl_Color bg) { 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 { // assumme "None" or "#transparent" for any errors + } else { // assume "None" or "#transparent" for any errors // this should be transparent... Fl::get_color(bg, c[0], c[1], c[2]); transparent_index = index; @@ -272,5 +273,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.1 2001/11/18 20:52:28 easysw Exp $". +// End of "$Id: fl_draw_pixmap.cxx,v 1.4.2.8.2.2 2001/11/19 01:06:45 easysw Exp $". // |
