From 45e539fff80a5b0040d517f01d82b7aa6cdb7d31 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 1 Feb 2011 10:13:54 +0000 Subject: fl_draw_image() on Mac OS and to a printer requires the image data to be kept until the page is finished. Thus, we now duplicate this data when the output is a printer, so the caller of the function does not have to take into account this Mac OS specificity. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8349 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Paged_Device.cxx | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/Fl_Paged_Device.cxx') diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx index 239f8b83a..eb604259e 100644 --- a/src/Fl_Paged_Device.cxx +++ b/src/Fl_Paged_Device.cxx @@ -141,35 +141,9 @@ void Fl_Paged_Device::print_window_part(Fl_Window *win, int x, int y, int w, int save_front->show(); current->set_current(); fl_draw_image(image_data, delta_x, delta_y, w, h, 3); -#ifdef __APPLE__ - add_image(image_data); -#else delete image_data; -#endif } - -#ifdef __APPLE__ -void Fl_Paged_Device::add_image(const uchar *data) -{ - struct chain_elt *elt = (struct chain_elt *)calloc(sizeof(struct chain_elt), 1); - elt->data = data; - if (image_list_) { elt->next = image_list_; } - image_list_ = elt; -} - -void Fl_Paged_Device::delete_image_list() -{ - while(image_list_) { - struct chain_elt *next = image_list_->next; - if (image_list_->data) delete (uchar*) image_list_->data; // msvc6 compilation fix - free(image_list_); - image_list_ = next; - } -} -#endif - - /** @brief Starts a print job. * -- cgit v1.2.3