diff options
| author | Manolo Gouy <Manolo> | 2017-08-30 15:49:58 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-08-30 15:49:58 +0000 |
| commit | eae09e7fa09c6a00988653ed67fe0d82f1861bff (patch) | |
| tree | fb6294b229eecc8222a6aae71a0790c9941be1ca /src/Fl_Graphics_Driver.cxx | |
| parent | 1b7750913328829c2d3c7f99b36b3a44758e69a2 (diff) | |
Create virtual Fl_Image::draw_scaled_(int X, int Y, int W, int H) and its implementations for image classes.
This allows to use the virtual function mechanism to adapt scaled image drawing both to the
image type and the graphics driver type.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12410 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index 737bffc09..e802952c9 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -196,11 +196,7 @@ void Fl_Graphics_Driver::draw(Fl_Shared_Image *shared, int X, int Y) { shared->image_->draw(X, Y, shared->w(), shared->h(), 0, 0); return; } - // don't call Fl_Graphics_Driver::draw_scaled(Fl_Image*,...) for an enlarged Fl_Bitmap or Fl_Pixmap - if (shared->image_->as_rgb_image() || (shared->w() <= shared->image_->w() && shared->h() <= shared->image_->h())) { - int done = draw_scaled(shared->image_, X, Y, shared->w(), shared->h()); - if (done) return; - } + if ( shared->image_->draw_scaled_(X, Y, shared->w(), shared->h()) ) return; if (shared->scaled_image_ && (shared->scaled_image_->w() != shared->w() || shared->scaled_image_->h() != shared->h())) { delete shared->scaled_image_; shared->scaled_image_ = NULL; |
