From 733b4de91d7edff33d00fadbc7a9be78d741248f Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 4 May 2018 16:06:08 +0000 Subject: Simplify Fl_Gl_Device_Plugin::print() using the Fl_Image::scale() member function. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12896 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Gl_Device_Plugin.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx index fd428c96f..f5e24585a 100644 --- a/src/Fl_Gl_Device_Plugin.cxx +++ b/src/Fl_Gl_Device_Plugin.cxx @@ -19,7 +19,6 @@ #include "config_lib.h" #include #include -#include #include "drivers/OpenGL/Fl_OpenGL_Display_Device.H" @@ -35,10 +34,9 @@ public: Fl_Gl_Window *glw = w->as_gl_window(); if (!glw) return 0; Fl_RGB_Image *img = Fl_OpenGL_Display_Device::capture_gl_rectangle(glw, 0, 0, glw->w(), glw->h()); - Fl_Shared_Image *shared = Fl_Shared_Image::get(img); - shared->scale(glw->w(), glw->h()); - shared->draw(x, y); - shared->release(); + img->scale(glw->w(), glw->h()); + img->draw(x, y); + delete img; return 1; } virtual Fl_RGB_Image* rectangle_capture(Fl_Widget *widget, int x, int y, int w, int h) { -- cgit v1.2.3