diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-12-11 16:03:13 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-12-11 16:03:13 +0000 |
| commit | fdcdc8fd46547a7cd77010db6b57f9cc9f4f51d1 (patch) | |
| tree | e7cfd7b774e59fe9b2092ede165e3dd058a20955 /src/Fl_Tiled_Image.cxx | |
| parent | 6905f61c2c00bd2e6777b0ab9d843fbe1a46dcc4 (diff) | |
Multiple fixes from Sebastien.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tiled_Image.cxx')
| -rw-r--r-- | src/Fl_Tiled_Image.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/Fl_Tiled_Image.cxx b/src/Fl_Tiled_Image.cxx index 22cb2b86c..c331265bd 100644 --- a/src/Fl_Tiled_Image.cxx +++ b/src/Fl_Tiled_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Tiled_Image.cxx,v 1.1.2.2 2001/12/06 18:12:35 easysw Exp $" +// "$Id: Fl_Tiled_Image.cxx,v 1.1.2.3 2001/12/11 16:03:12 easysw Exp $" // // Tiled image code for the Fast Light Tool Kit (FLTK). // @@ -74,12 +74,15 @@ Fl_Tiled_Image::copy(int W, // I - New width void Fl_Tiled_Image::color_average(Fl_Color c, // I - Color to blend with float i) { // I - Blend fraction - Fl_Image *temp = image_->copy(); + if (alloc_image_) image_->color_average(c, i); + else { + Fl_Image *temp = image_->copy(); - temp->color_average(c, i); + temp->color_average(c, i); - image_ = temp; - alloc_image_ = 1; + image_ = temp; + alloc_image_ = 1; + } } @@ -89,12 +92,15 @@ Fl_Tiled_Image::color_average(Fl_Color c, // I - Color to blend with void Fl_Tiled_Image::desaturate() { - Fl_Image *temp = image_->copy(); + if (alloc_image_) image_->desaturate(); + else { + Fl_Image *temp = image_->copy(); - temp->desaturate(); + temp->desaturate(); - image_ = temp; - alloc_image_ = 1; + image_ = temp; + alloc_image_ = 1; + } } @@ -133,5 +139,5 @@ Fl_Tiled_Image::draw(int X, // I - Starting X position // -// End of "$Id: Fl_Tiled_Image.cxx,v 1.1.2.2 2001/12/06 18:12:35 easysw Exp $". +// End of "$Id: Fl_Tiled_Image.cxx,v 1.1.2.3 2001/12/11 16:03:12 easysw Exp $". // |
