summaryrefslogtreecommitdiff
path: root/src/fl_color_mac.cxx
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-10-13 23:10:43 +0000
committerFabien Costantini <fabien@onepost.net>2008-10-13 23:10:43 +0000
commit92051890f1127429142cc0b60e3e9a1e567bf01d (patch)
tree4c0e7f28192914b24202d08aa3eaa72a7bf5f7e4 /src/fl_color_mac.cxx
parent8e9c1d1ab030dc7beed522f368c467dd94e1f8bb (diff)
Quickdraw removal: option removed from configure, all Qd code removed from sources. Also took this opportunity to sort the ifdef clauses so that USE_X11 shows first. Also added error pragma to enforce proper target checking, thus make even less assumptions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6423 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_color_mac.cxx')
-rw-r--r--src/fl_color_mac.cxx18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/fl_color_mac.cxx b/src/fl_color_mac.cxx
index 7a472b32e..a179219e6 100644
--- a/src/fl_color_mac.cxx
+++ b/src/fl_color_mac.cxx
@@ -66,13 +66,7 @@ void fl_color(Fl_Color i) {
g = c>>16;
b = c>> 8;
}
-#ifdef __APPLE_QD__
- RGBColor rgb;
- rgb.red = (r<<8)|r;
- rgb.green = (g<<8)|g;
- rgb.blue = (b<<8)|b;
- RGBForeColor(&rgb);
-#elif defined(__APPLE_QUARTZ__)
+#if defined(__APPLE_QUARTZ__)
if (!fl_gc) return; // no context yet? We will assign the color later.
float fr = r/255.0f;
float fg = g/255.0f;
@@ -86,20 +80,14 @@ void fl_color(Fl_Color i) {
void fl_color(uchar r, uchar g, uchar b) {
fl_color_ = fl_rgb_color(r, g, b);
-#ifdef __APPLE_QD__
- RGBColor rgb;
- rgb.red = (r<<8)|r;
- rgb.green = (g<<8)|g;
- rgb.blue = (b<<8)|b;
- RGBForeColor(&rgb);
-#elif defined(__APPLE_QUARTZ__)
+#if defined(__APPLE_QUARTZ__)
float fr = r/255.0f;
float fg = g/255.0f;
float fb = b/255.0f;
CGContextSetRGBFillColor(fl_gc, fr, fg, fb, 1.0f);
CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f);
#else
-# error : neither Quickdraw nor Quartz defined
+# error : Quartz not defined
#endif
}