summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-05-22 13:37:12 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-05-22 13:37:12 +0200
commit277cee73b0a888894b5a68c239f4d26780830e8e (patch)
tree9bd5e6209eba0615e19290c673f1a42568a55765 /src
parentda6d671d9b9d50d8e0c90febda5c3ca610f9e839 (diff)
Improve drawing of Fl_RGB_Image's to Fl_Copy_Surface on macOS
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx2
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
index 5546a5136..4fe51c513 100644
--- a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
@@ -41,7 +41,7 @@ Fl_Copy_Surface_Driver *Fl_Copy_Surface_Driver::newCopySurfaceDriver(int w, int
*/
Fl_Quartz_Copy_Surface_Driver::Fl_Quartz_Copy_Surface_Driver(int w, int h) : Fl_Copy_Surface_Driver(w, h) {
- driver(new Fl_Quartz_Graphics_Driver);
+ driver(new Fl_Quartz_Printer_Graphics_Driver);
prepare_copy_pdf_and_tiff(w, h);
}
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
index 71fc08637..5060c2009 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
@@ -152,13 +152,13 @@ void Fl_Quartz_Graphics_Driver::cache(Fl_RGB_Image *rgb) {
if (!ld) ld = rgb->data_w() * rgb->d();
CGDataProviderRef src;
if ( has_feature(PRINTER) ) {
- // When printing, the data at rgb->array are used when the printed page is completed,
- // that is, after return from this function.
+ // When printing or copying to clipboard, the data at rgb->array are used when
+ // the PDF page is completed, that is, after return from this function.
// At that stage, the rgb object has possibly been deleted. It is therefore necessary
- // to use a copy of rgb->array for printing. The mask_ member of rgb
- // is used to avoid repeating the copy operation if rgb is printed again.
+ // to use a copy of rgb->array. The mask_ member of rgb
+ // is used to avoid repeating the copy operation if rgb is drawn again.
// The CGImage data provider deletes the copy at the latest of these two events:
- // deletion of rgb, and completion of the page where rgb was printed.
+ // deletion of rgb, and completion of the PDF page where rgb was drawn.
size_t total = ld * rgb->data_h();
uchar *copy = new uchar[total];
memcpy(copy, rgb->array, total);