diff options
| author | Manolo Gouy <Manolo> | 2018-05-04 15:11:47 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-05-04 15:11:47 +0000 |
| commit | 20ccb6b7f2b0b2b742211c31a32c3ac612c43489 (patch) | |
| tree | bc432cbcba741ba6dab1ab27b0c5674160b67b12 /src/Fl_Screen_Driver.cxx | |
| parent | d4eeb75ac6829e663996e87c3584e247d10eead8 (diff) | |
Shorten the list of virtual member functions used to support Fl_Widget_Surface derived classes.
Change Fl_Cocoa_Screen_Driver::read_win_rectangle() so it captures only
from the current window and ignores its subwindows, as do other Fl_Screen_Driver derived classes.
Remove Fl_Cocoa_Printer_Driver::print_window_part() that is no longer necessary.
Remove Fl_Printer::print_widget() and Fl_Printer::print_window_part() that
are no longer necessary.
Stop Fl_Widget_Surface::print_window_part() from being virtual because its platform-independent
implementation should suffice.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12894 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
| -rw-r--r-- | src/Fl_Screen_Driver.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx index 971ce423e..85a60109c 100644 --- a/src/Fl_Screen_Driver.cxx +++ b/src/Fl_Screen_Driver.cxx @@ -196,6 +196,7 @@ Fl_RGB_Image *Fl_Screen_Driver::traverse_to_gl_subwindows(Fl_Group *g, int x, in if (full_img) g->as_window()->make_current(); full_img = Fl::screen_driver()->read_win_rectangle(x, y, w, h); } + float full_img_scale = (full_img && w > 0 ? float(full_img->data_w())/w : 1); int n = g->children(); for (int i = 0; i < n; i++) { Fl_Widget *c = g->child(i); @@ -221,9 +222,7 @@ Fl_RGB_Image *Fl_Screen_Driver::traverse_to_gl_subwindows(Fl_Group *g, int x, in } else { top = full_img->h() - (origin_y - y + img->h()); } - int nscreen = c->as_window()->driver()->screen_num(); - float s = Fl::screen_driver()->scale(nscreen); - write_image_inside(full_img, img, (origin_x - x) * s, top * s); + write_image_inside(full_img, img, (origin_x - x) * full_img_scale, top * full_img_scale); delete img; } } |
