diff options
| author | Manolo Gouy <Manolo> | 2010-04-18 06:57:37 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-04-18 06:57:37 +0000 |
| commit | d0b1cc30f7eac228caddadb2bc675865a4124b1b (patch) | |
| tree | 210bf48b7ca03062c9a02c9b057539263f3d7ae1 /src/Fl_Abstract_Printer.cxx | |
| parent | 828568a33610d7696f4764ce2ad0f4014f4a6e26 (diff) | |
Removed multiple inheritance: back to r. 7519 exactly.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7522 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Abstract_Printer.cxx')
| -rw-r--r-- | src/Fl_Abstract_Printer.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/Fl_Abstract_Printer.cxx b/src/Fl_Abstract_Printer.cxx index 4560ad7df..0490dcc68 100644 --- a/src/Fl_Abstract_Printer.cxx +++ b/src/Fl_Abstract_Printer.cxx @@ -70,7 +70,7 @@ void Fl_Abstract_Printer::print_widget(Fl_Widget* widget, int delta_x, int delta int width, height; this->printable_rect(&width, &height); drawn_by_plugin = pi->print(widget, 0, 0, height); - } + } } if (!drawn_by_plugin) { widget->draw(); @@ -126,7 +126,7 @@ void Fl_Abstract_Printer::origin(int *x, int *y) void Fl_Abstract_Printer::print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y) { int slice, width, offset, count = 0; - Fl_Device *current = Fl_Device::display_device()->set_current(); + Fl_Device::display_device()->set_current(); Fl_Window *save_front = Fl::first_window(); win->show(); fl_gc = NULL; @@ -144,7 +144,7 @@ void Fl_Abstract_Printer::print_window_part(Fl_Window *win, int x, int y, int w, image_data[count++] = fl_read_image(NULL, x + offset, y, width, h); } save_front->show(); - current->set_current(); + this->set_current(); for ( int i = 0, offset = 0; i < count; i++, offset += slice) { width = slice; if (offset + width > w) width = w - offset; @@ -179,6 +179,18 @@ void Fl_Abstract_Printer::delete_image_list() } #endif +Fl_Device *Fl_Abstract_Printer::set_current(void) +{ +#ifdef __APPLE__ + fl_gc = (CGContextRef)gc; +#elif defined(WIN32) + fl_gc = (HDC)gc; +#else + fl_gc = (_XGC*)gc; +#endif + return this->Fl_Device::set_current(); +} + /** @brief Starts a print job. |
