diff options
| author | Manolo Gouy <Manolo> | 2018-05-02 10:39:34 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-05-02 10:39:34 +0000 |
| commit | 5da16bbd36ebfb76f4af296929aa961c0bfc036a (patch) | |
| tree | 59cc623130a16ec6fb706490eb012eb795afc2e6 /src | |
| parent | b73ff860cc44217e642335ef61ce8c1ee418eeb9 (diff) | |
Simplify Fl_Widget_Surface::print_window_part() using the new Fl_Image::scale() member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12890 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Widget_Surface.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Fl_Widget_Surface.cxx b/src/Fl_Widget_Surface.cxx index 64f86d9ed..8e377bfec 100644 --- a/src/Fl_Widget_Surface.cxx +++ b/src/Fl_Widget_Surface.cxx @@ -158,12 +158,11 @@ void Fl_Widget_Surface::print_window_part(Fl_Window *win, int x, int y, int w, i Fl::check(); win->driver()->flush(); // makes the window current Fl_RGB_Image *img = Fl_Screen_Driver::traverse_to_gl_subwindows(win, x, y, w, h, NULL); - Fl_Shared_Image *shared = Fl_Shared_Image::get(img); - shared->scale(w, h, 1, 1); + img->scale(w, h, 1, 1); if (save_front != win) save_front->show(); Fl_Surface_Device::pop_current(); - shared->draw(delta_x, delta_y); - shared->release(); + img->draw(delta_x, delta_y); + delete img; } /** |
