summaryrefslogtreecommitdiff
path: root/src/fl_color_mac.cxx
diff options
context:
space:
mode:
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
}