diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-06-20 12:49:38 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-06-20 12:49:38 +0200 |
| commit | e698af035a8d9363ac6d212a8e986e1f4fdac969 (patch) | |
| tree | 8b1d03c65220a09219c614b18eea10014536cae2 /src/Fl_Shared_Image.cxx | |
| parent | 02870242eea8b729b3dbd6d23eb77372f61c6318 (diff) | |
Fix issue #427 - 2nd part
Fix Fl_Tiled_Image made from scaled source image.
Fix Fl_Shared_Image::update() to allow scaled source image.
Correct handling of default value (-1) of 3rd argument of 3-argument Fl_BMP_Image constructor.
Diffstat (limited to 'src/Fl_Shared_Image.cxx')
| -rw-r--r-- | src/Fl_Shared_Image.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx index 91e093b6f..6c14b9c12 100644 --- a/src/Fl_Shared_Image.cxx +++ b/src/Fl_Shared_Image.cxx @@ -190,10 +190,12 @@ Fl_Shared_Image::add() { void Fl_Shared_Image::update() { if (image_) { - w(image_->w()); - h(image_->h()); + int W = w(), H = h(); + w(image_->data_w()); + h(image_->data_h()); d(image_->d()); data(image_->data(), image_->count()); + if (W && H) scale(W, H, 0, 1); } } |
