summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan MacArthur <imacarthur@gmail.com>2008-11-27 20:43:27 +0000
committerIan MacArthur <imacarthur@gmail.com>2008-11-27 20:43:27 +0000
commit994c1d82a26a4c6016839ddd99230aa556456d81 (patch)
tree4884ab878d6f0cc90f110e42d078d7343a494707 /src
parent865f3d8e61f5fe7a582f1233b90bd2ef8260c827 (diff)
STR #2097 - attempt to workaround fl_round_box not honouring colors passwed to it from fl_rgb_color(...) calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6530 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_round_box.cxx40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/fl_round_box.cxx b/src/fl_round_box.cxx
index b74f82e41..275012481 100644
--- a/src/fl_round_box.cxx
+++ b/src/fl_round_box.cxx
@@ -41,7 +41,7 @@ void fl_arc_i(int x,int y,int w,int h,double a1,double a2) {
enum {UPPER_LEFT, LOWER_RIGHT, CLOSED, FILL};
-static void draw(int which, int x,int y,int w,int h, int inset, uchar color)
+static void draw(int which, int x,int y,int w,int h, int inset, Fl_Color color)
{
if (inset*2 >= w) inset = (w-1)/2;
if (inset*2 >= h) inset = (h-1)/2;
@@ -51,7 +51,7 @@ static void draw(int which, int x,int y,int w,int h, int inset, uchar color)
h -= 2*inset;
int d = w <= h ? w : h;
if (d <= 1) return;
- fl_color((Fl_Color)color);
+ fl_color(color);
void (*f)(int,int,int,int,double,double);
f = (which==FILL) ? fl_pie : fl_arc_i;
if (which >= CLOSED) {
@@ -85,29 +85,29 @@ extern uchar* fl_gray_ramp();
void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) {
uchar *g = fl_gray_ramp();
draw(FILL, x, y, w, h, 2, bgcolor);
- draw(UPPER_LEFT, x+1, y, w-2, h, 0, g['N']);
- draw(UPPER_LEFT, x+1, y, w-2, h, 1, g['H']);
- draw(UPPER_LEFT, x, y, w, h, 0, g['N']);
- draw(UPPER_LEFT, x, y, w, h, 1, g['H']);
- draw(LOWER_RIGHT, x, y, w, h, 0, g['S']);
- draw(LOWER_RIGHT, x+1, y, w-2, h, 0, g['U']);
- draw(LOWER_RIGHT, x, y, w, h, 1, g['U']);
- draw(LOWER_RIGHT, x+1, y, w-2, h, 1, g['W']);
- draw(CLOSED, x, y, w, h, 2, g['A']);
+ draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g['N']);
+ draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g['H']);
+ draw(UPPER_LEFT, x, y, w, h, 0, (Fl_Color)g['N']);
+ draw(UPPER_LEFT, x, y, w, h, 1, (Fl_Color)g['H']);
+ draw(LOWER_RIGHT, x, y, w, h, 0, (Fl_Color)g['S']);
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g['U']);
+ draw(LOWER_RIGHT, x, y, w, h, 1, (Fl_Color)g['U']);
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g['W']);
+ draw(CLOSED, x, y, w, h, 2, (Fl_Color)g['A']);
}
void fl_round_up_box(int x, int y, int w, int h, Fl_Color bgcolor) {
uchar *g = fl_gray_ramp();
draw(FILL, x, y, w, h, 2, bgcolor);
- draw(LOWER_RIGHT, x+1, y, w-2, h, 0, g['H']);
- draw(LOWER_RIGHT, x+1, y, w-2, h, 1, g['N']);
- draw(LOWER_RIGHT, x, y, w, h, 1, g['H']);
- draw(LOWER_RIGHT, x, y, w, h, 2, g['N']);
- draw(UPPER_LEFT, x, y, w, h, 2, g['U']);
- draw(UPPER_LEFT, x+1, y, w-2, h, 1, g['S']);
- draw(UPPER_LEFT, x, y, w, h, 1, g['W']);
- draw(UPPER_LEFT, x+1, y, w-2, h, 0, g['U']);
- draw(CLOSED, x, y, w, h, 0, g['A']);
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g['H']);
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g['N']);
+ draw(LOWER_RIGHT, x, y, w, h, 1, (Fl_Color)g['H']);
+ draw(LOWER_RIGHT, x, y, w, h, 2, (Fl_Color)g['N']);
+ draw(UPPER_LEFT, x, y, w, h, 2, (Fl_Color)g['U']);
+ draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g['S']);
+ draw(UPPER_LEFT, x, y, w, h, 1, (Fl_Color)g['W']);
+ draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g['U']);
+ draw(CLOSED, x, y, w, h, 0, (Fl_Color)g['A']);
}
extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);