From bf7c25a1d72b28b6b19a1ac54492be539cb75552 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 12 Feb 2016 16:17:40 +0000 Subject: Add Fl_Shared_Image *Fl_Image_Surface::highres_image() to draw into high-resolution bitmap. Also, change arguments of void Fl_Window::capture_titlebar_and_borders() from Fl_RGB_Image to F_Shared_Image so, in the future, scaled images having a drawing size distinct from a pixel size can be returned, to support high-resolution displays. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Paged_Device.cxx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src/Fl_Paged_Device.cxx') diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx index ee0939b4f..e0a0f1a1b 100644 --- a/src/Fl_Paged_Device.cxx +++ b/src/Fl_Paged_Device.cxx @@ -20,6 +20,7 @@ */ #include +#include #include #include @@ -300,29 +301,25 @@ const Fl_Paged_Device::page_format Fl_Paged_Device::page_formats[NO_PAGE_FORMATS void Fl_Paged_Device::draw_decorated_window(Fl_Window *win, int x_offset, int y_offset) { - Fl_RGB_Image *top, *left, *bottom, *right; + Fl_Shared_Image *top, *left, *bottom, *right; win->capture_titlebar_and_borders(top, left, bottom, right); int wsides = left ? left->w() : 0; int toph = top ? top->h() : 0; if (top) { -#ifdef __APPLE__ // PORTME: platform paged device - top->draw(x_offset, y_offset); // draw with transparency -#else - fl_draw_image(top->array, x_offset, y_offset, top->w(), top->h(), top->d()); -#endif // __APPLE__ // PORTME: platform paged device - delete top; + top->draw(x_offset, y_offset); + top->release(); } if (left) { - fl_draw_image(left->array, x_offset, y_offset + toph, left->w(), left->h(), left->d()); - delete left; + left->draw(x_offset, y_offset); + left->release(); } if (right) { - fl_draw_image(right->array, x_offset + win->w() + wsides, y_offset + toph, right->w(), right->h(), right->d()); - delete right; + right->draw(x_offset, y_offset); + right->release(); } if (bottom) { - fl_draw_image(bottom->array, x_offset, y_offset + toph + win->h(), bottom->w(), bottom->h(), bottom->d()); - delete bottom; + bottom->draw(x_offset, y_offset); + bottom->release(); } this->print_widget(win, x_offset + wsides, y_offset + toph); } -- cgit v1.2.3