summaryrefslogtreecommitdiff
path: root/src/fl_round_box.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fl_round_box.cxx')
-rw-r--r--src/fl_round_box.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fl_round_box.cxx b/src/fl_round_box.cxx
index ea46c7737..d1ebdcb25 100644
--- a/src/fl_round_box.cxx
+++ b/src/fl_round_box.cxx
@@ -44,8 +44,11 @@ static void draw(int which, int x,int y,int w,int h, int inset, Fl_Color color)
void (*f)(int,int,int,int,double,double);
f = (which==FILL) ? fl_pie : fl_arc_i;
if (which >= CLOSED) {
- f(x+w-d, y, d, d, w<=h ? 0 : -90, w<=h ? 180 : 90);
- f(x, y+h-d, d, d, w<=h ? 180 : 90, w<=h ? 360 : 270);
+ if (w == h) f(x, y, d, d, 0, 360);
+ else {
+ f(x+w-d, y, d, d, w<=h ? 0 : -90, w<=h ? 180 : 90);
+ f(x, y+h-d, d, d, w<=h ? 180 : 90, w<=h ? 360 : 270);
+ }
} else if (which == UPPER_LEFT) {
f(x+w-d, y, d, d, 45, w<=h ? 180 : 90);
f(x, y+h-d, d, d, w<=h ? 180 : 90, 225);
@@ -73,9 +76,7 @@ extern const uchar* fl_gray_ramp();
void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) {
const uchar *g = fl_gray_ramp();
- fl_antialias(0); // fix for issue #792
draw(FILL, x, y, w, h, 2, Fl::box_color(bgcolor));
- fl_antialias(1); // fix for issue #792
draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g[(int)'N']);
draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g[(int)'H']);
draw(UPPER_LEFT, x, y, w, h, 0, (Fl_Color)g[(int)'N']);