From 57193e52c0ea34a6af53289b72b232e226466bc1 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 31 Aug 2004 00:27:40 +0000 Subject: Quartz for FLTK 1.1: - added pixmap drawing (no masking yet) - added bitmap drawing - added line styles (complete) todo: - missing refresh (double test, fluid, others) - missing pixmap mask - color_chooser has alignment issues - images scale instead of beeing scissored - fonts git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3798 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_draw_image_mac.cxx | 51 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) (limited to 'src/fl_draw_image_mac.cxx') diff --git a/src/fl_draw_image_mac.cxx b/src/fl_draw_image_mac.cxx index 5e656b5f3..08820ffd6 100644 --- a/src/fl_draw_image_mac.cxx +++ b/src/fl_draw_image_mac.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_draw_image_mac.cxx,v 1.1.2.7 2004/08/25 00:20:27 matthiaswm Exp $" +// "$Id: fl_draw_image_mac.cxx,v 1.1.2.8 2004/08/31 00:27:40 matthiaswm Exp $" // // MacOS image drawing code for the Fast Light Tool Kit (FLTK). // @@ -58,6 +58,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, { if (!linedelta) linedelta = W*delta; +#ifdef __APPLE_QD__ // theoretically, if the current GPort permits, we could write // directly into it, avoiding the temporary GWorld. For now I // will go the safe way... . @@ -167,7 +168,51 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, } } } - +#elif defined(__APPLE_QUARTZ__) + // following the very save (and very slow) way to write the image into the give port + CGContextSetShouldAntialias(fl_gc, false); + if ( cb ) + { + uchar *tmpBuf = new uchar[ W*4 ]; + for ( int i=0; i