diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2004-08-25 00:20:27 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2004-08-25 00:20:27 +0000 |
| commit | 8327822026ac50dc9e20823988b0f53bc143b7ba (patch) | |
| tree | 864e83d7482fa6414d48621a16b677246e49f8ae /src/Fl_Pixmap.cxx | |
| parent | 522f98d5230e78f983ffcc8f05391c060661cf1a (diff) | |
Updated config stuff to allow for --enable-quartz ofr Mac OS X which in
turn defined USE_QUARTZ to 1 and defines __APPLE_QUARTZ__. If Quartz
is not disabled, it will define __APPLE_QD__ for Quickdraw.
I also replaced all relevand #ifdef __APPLE__ with #ifdef __APPLE_QD__
#elif defined(__APPLE_QUARTZ__). This does not affect the compile at
this time and both version will generate the same Quickdraw code.
I will start to replace all QD calls with Quartz calls for the
remainder of the week until I can completely remove all QD calls from
the Quartz branch.
Thanks to Robert Smith for a great initial Quartz implementation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Pixmap.cxx')
| -rw-r--r-- | src/Fl_Pixmap.cxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index f07cdd973..924246a13 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.28 2004/04/11 04:38:58 easysw Exp $" +// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.29 2004/08/25 00:20:25 matthiaswm Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // @@ -104,7 +104,7 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) { } else { fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)id, cx, cy); } -#elif defined(__APPLE__) +#elif defined(__APPLE_QD__) if (mask) { Rect src, dst; src.left = cx; src.right = cx+W; @@ -123,6 +123,26 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) { } else { fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)id, cx, cy); } +#elif defined(__APPLE_QUARTZ__) +#warning quartz + if (mask) { + Rect src, dst; + src.left = cx; src.right = cx+W; + src.top = cy; src.bottom = cy+H; + dst.left = X; dst.right = X+W; + dst.top = Y; dst.bottom = Y+H; + RGBColor rgb; + rgb.red = 0xffff; rgb.green = 0xffff; rgb.blue = 0xffff; + RGBBackColor(&rgb); + rgb.red = 0x0000; rgb.green = 0x0000; rgb.blue = 0x0000; + RGBForeColor(&rgb); + CopyMask(GetPortBitMapForCopyBits((GrafPtr)id), + GetPortBitMapForCopyBits((GrafPtr)mask), + GetPortBitMapForCopyBits(GetWindowPort(fl_window)), + &src, &src, &dst); + } else { + fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)id, cx, cy); + } #else if (mask) { // I can't figure out how to combine a mask with existing region, @@ -461,5 +481,5 @@ void Fl_Pixmap::desaturate() { } // -// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.28 2004/04/11 04:38:58 easysw Exp $". +// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.29 2004/08/25 00:20:25 matthiaswm Exp $". // |
