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
This commit is contained in:
parent
a8054a719f
commit
733b4de91d
@ -19,7 +19,6 @@
|
||||
#include "config_lib.h"
|
||||
#include <FL/Fl_Gl_Window.H>
|
||||
#include <FL/Fl_RGB_Image.H>
|
||||
#include <FL/Fl_Shared_Image.H>
|
||||
#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) {
|
||||
|
Loading…
Reference in New Issue
Block a user