summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-11-18 21:45:51 +0000
committerManolo Gouy <Manolo>2014-11-18 21:45:51 +0000
commita5c4784ded9d16121ed2fa454066822499fdaf5f (patch)
treee2378573f831544a1567383d892802f17c6a9e50
parentb8a1618c0afa136e2ba3bb54ee87129655630873 (diff)
Use fl_xyline() and fl_yxline() that are better for horizontal and vertical lines.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10460 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/fl_gleam.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/fl_gleam.cxx b/src/fl_gleam.cxx
index 02ff55ca4..696bc8a98 100644
--- a/src/fl_gleam.cxx
+++ b/src/fl_gleam.cxx
@@ -45,7 +45,7 @@ static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, Fl_C
// This loop generates the gradient at the top of the widget
for (float k = 1; k >= 0; k -= step_size_top){
gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
- fl_line(x, y+j, x+w, y+j);
+ fl_xyline(x, y+j, x+w);
j++;
}
gleam_color(fg1);
@@ -53,7 +53,7 @@ static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, Fl_C
// This loop generates the gradient at the bottom of the widget
for (float k = 1; k >= 0; k -= step_size_bottom){
gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
- fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+ fl_xyline(x, y+j+h_flat-1, x+w);
j++;
}
}
@@ -68,16 +68,16 @@ static void shade_rect_top_bottom_down(int x, int y, int w, int h, Fl_Color bc,
static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, Fl_Color lc) {
gleam_color(fg1);
- fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
- fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
- fl_line(x+1, y, x+w-1, y); //Go across the top
- fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+ fl_yxline(x, y+h-1, y+1); //Go from bottom to top left side
+ fl_yxline(x+w, y+h-1, y+1); //Go from bottom to top right side
+ fl_xyline(x+1, y, x+w-1); //Go across the top
+ fl_xyline(x+1, y+h, x+w-1); //Go across the bottom
gleam_color(fg2);
- fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
- fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+ fl_yxline(x+1, y+h-2, y+2); //Go from bottom to top left side
+ fl_yxline(x+w-1, y+h-2, y+2); //Go from bottom to top right side
gleam_color(lc);
- fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
- fl_line(x+2, y+h-1, x+w-3, y+h-1); //Go across the bottom
+ fl_xyline(x+2, y+1, x+w-3); //Go across the top
+ fl_xyline(x+2, y+h-1, x+w-3); //Go across the bottom
}
static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, Fl_Color lc, float th1, float th2) {