summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Shared_Image.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index 3c2aa4b85..16181e9a8 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -338,7 +338,11 @@ void Fl_Shared_Image::draw(int X, int Y, int W, int H, int cx, int cy) {
return;
}
fl_push_clip(X, Y, W, H);
- int done = fl_graphics_driver->draw_scaled(image_, X-cx, Y-cy, w(), h());
+ int done = 0;
+ // don't call Fl_Graphics_Driver::draw_scaled(Fl_Image*,...) for an enlarged Fl_Bitmap or Fl_Pixmap
+ if ((d() != 0 && count() < 2) || (w() <= image_->w() && h() <= image_->h())) {
+ done = fl_graphics_driver->draw_scaled(image_, X-cx, Y-cy, w(), h());
+ }
if (!done) {
if (scaled_image_ && (scaled_image_->w() != w() || scaled_image_->h() != h())) {
delete scaled_image_;