Remove platform-dependent code from Fl_Widget_Surface.cxx - last part.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11446 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
21540390cb
commit
baf41cac1a
@ -149,23 +149,17 @@ void Fl_Widget_Surface::origin(int x, int y) {
|
|||||||
*/
|
*/
|
||||||
void Fl_Widget_Surface::print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y)
|
void Fl_Widget_Surface::print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y)
|
||||||
{
|
{
|
||||||
Fl_Surface_Device *current = Fl_Surface_Device::surface();
|
|
||||||
Fl_Display_Device::display_device()->set_current();
|
Fl_Display_Device::display_device()->set_current();
|
||||||
Fl_Window *save_front = Fl::first_window();
|
Fl_Window *save_front = Fl::first_window();
|
||||||
win->show();
|
win->show();
|
||||||
Fl::check();
|
Fl::check();
|
||||||
Fl_X::i(win)->flush(); // makes the window current
|
Fl_X::i(win)->flush(); // makes the window current necessary for fl_read_image
|
||||||
uchar *image_data;
|
uchar *image_data;
|
||||||
image_data = fl_read_image(NULL, x, y, w, h);
|
image_data = fl_read_image(NULL, x, y, w, h);
|
||||||
if (save_front != win) save_front->show();
|
if (save_front != win) save_front->show();
|
||||||
current->set_current();
|
set_current();
|
||||||
fl_draw_image(image_data, delta_x, delta_y, w, h, 3);
|
fl_draw_image(image_data, delta_x, delta_y, w, h, 3);
|
||||||
delete[] image_data;
|
delete[] image_data;
|
||||||
#ifdef WIN32
|
|
||||||
HDC gc = GetDC(fl_xid(win));
|
|
||||||
fl_graphics_driver->gc(gc);
|
|
||||||
ReleaseDC(fl_xid(win), gc);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user