summaryrefslogtreecommitdiff
path: root/src/fl_round_box.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2011-05-01 12:45:29 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2011-05-01 12:45:29 +0000
commit428008c27612583dfa5951cbb28de716a48976fe (patch)
tree4382c928027b1db72d32b0a7622ace85d717950d /src/fl_round_box.cxx
parent6c9d1f7840fae6cbf88e71fed6186a934f7ba8ef (diff)
Fixed drawing artifacts when scrolling round boxes (FL_ROUND_UP_BOX and
FL_ROUND_DOWN_BOX) on Linux (STR #2615). This was done by (a) setting the line width in the box drawing function (was undefined, maybe 0) (b) taking care of zero and negative line width in X11 clipping functions. Both solutions would have solved the particular problem individually. Additionally made local helper function fl_arc_i() in src/fl_round_box.cxx static to avoid name clashes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_round_box.cxx')
-rw-r--r--src/fl_round_box.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fl_round_box.cxx b/src/fl_round_box.cxx
index b98e47b7d..bb734dbcd 100644
--- a/src/fl_round_box.cxx
+++ b/src/fl_round_box.cxx
@@ -35,7 +35,7 @@
// A compiler from a certain very large software company will not compile
// the function pointer assignment due to the name conflict with fl_arc.
// This function is to fix that:
-void fl_arc_i(int x,int y,int w,int h,double a1,double a2) {
+static void fl_arc_i(int x,int y,int w,int h,double a1,double a2) {
fl_arc(x,y,w,h,a1,a2);
}
@@ -52,6 +52,7 @@ static void draw(int which, int x,int y,int w,int h, int inset, Fl_Color color)
int d = w <= h ? w : h;
if (d <= 1) return;
fl_color(color);
+ fl_line_style(0,1);
void (*f)(int,int,int,int,double,double);
f = (which==FILL) ? fl_pie : fl_arc_i;
if (which >= CLOSED) {
@@ -78,6 +79,7 @@ static void draw(int which, int x,int y,int w,int h, int inset, Fl_Color color)
if (which != LOWER_RIGHT) fl_xyline(x+d/2-1, y, x+w-d/2+1);
}
}
+ fl_line_style(0);
}
extern uchar* fl_gray_ramp();