diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_symbols.cxx | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/src/fl_symbols.cxx b/src/fl_symbols.cxx index fa54e44c3..8b87edf34 100644 --- a/src/fl_symbols.cxx +++ b/src/fl_symbols.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_symbols.cxx,v 1.6 1999/01/07 19:17:43 mike Exp $" +// "$Id: fl_symbols.cxx,v 1.7 1999/01/27 08:45:11 bill Exp $" // // Symbol drawing code for the Fast Light Tool Kit (FLTK). // @@ -157,11 +157,16 @@ int fl_draw_symbol(const char *label,int x,int y,int w,int h,Fl_Color col) { #define EC fl_end_loop() #define vv(x,y) fl_vertex(x,y) -static void rectangle(double x,double y,double x2,double y2,Fl_Color c) { - fl_color(c); +//for the outline color +static void set_outline_color(Fl_Color c) { + fl_color(fl_color_average(c, FL_BLACK, .5)); +} + +static void rectangle(double x,double y,double x2,double y2,Fl_Color col) { + fl_color(col); BP; vv(x,y); vv(x2,y); vv(x2,y2); vv(x,y2); EP; - //fl_color(FL_BLACK); - //BC; vv(x,y); vv(x2,y); vv(x2,y2); vv(x,y2); EC; + set_outline_color(col); + BC; vv(x,y); vv(x2,y); vv(x2,y2); vv(x,y2); EC; } /* The drawing routines */ @@ -171,6 +176,9 @@ static void draw_arrow1(Fl_Color col) fl_color(col); BP; vv(-0.8,-0.4); vv(-0.8,0.4); vv(0.0,0.4); vv(0.0,-0.4); EP; BP; vv(0.0,0.8); vv(0.8,0.0); vv(0.0,-0.8); vv(0.0,-0.4); vv(0.0,0.4); EP; + set_outline_color(col); + BC; vv(-0.8,-0.4); vv(-0.8,0.4); vv(0.0,0.4); vv(0.0,0.8); vv(0.8,0.0); + vv(0.0,-0.8); vv(0.0,-0.4); EC; } static void draw_arrow1bar(Fl_Color col) @@ -183,6 +191,8 @@ static void draw_arrow2(Fl_Color col) { fl_color(col); BP; vv(-0.3,0.8); vv(0.50,0.0); vv(-0.3,-0.8); EP; + set_outline_color(col); + BC; vv(-0.3,0.8); vv(0.50,0.0); vv(-0.3,-0.8); EC; } static void draw_arrow3(Fl_Color col) @@ -190,6 +200,9 @@ static void draw_arrow3(Fl_Color col) fl_color(col); BP; vv(0.1,0.8); vv(0.9,0.0); vv(0.1,-0.8); EP; BP; vv(-0.7,0.8); vv(0.1,0.0); vv(-0.7,-0.8); EP; + set_outline_color(col); + BC; vv(0.1,0.8); vv(0.9,0.0); vv(0.1,-0.8); EC; + BC; vv(-0.7,0.8); vv(0.1,0.0); vv(-0.7,-0.8); EC; } static void draw_arrowbar(Fl_Color col) @@ -197,6 +210,9 @@ static void draw_arrowbar(Fl_Color col) fl_color(col); BP; vv(0.2,0.8); vv(0.6,0.8); vv(0.6,-0.8); vv(0.2,-0.8); EP; BP; vv(-0.6,0.8); vv(0.2,0.0); vv(-0.6,-0.8); EP; + set_outline_color(col); + BC; vv(0.2,0.8); vv(0.6,0.8); vv(0.6,-0.8); vv(0.2,-0.8); EC; + BC; vv(-0.6,0.8); vv(0.2,0.0); vv(-0.6,-0.8); EC; } static void draw_arrowbox(Fl_Color col) @@ -204,6 +220,9 @@ static void draw_arrowbox(Fl_Color col) fl_color(col); BP; vv(-0.6,0.8); vv(0.2,0.0); vv(-0.6,-0.8); EP; BC; vv(0.2,0.8); vv(0.6,0.8); vv(0.6,-0.8); vv(0.2,-0.8); EC; + set_outline_color(col); + BC; vv(0.2,0.8); vv(0.6,0.8); vv(0.6,-0.8); vv(0.2,-0.8); EC; + BC; vv(-0.6,0.8); vv(0.2,0.0); vv(-0.6,-0.8); EC; } static void draw_bararrow(Fl_Color col) @@ -211,6 +230,9 @@ static void draw_bararrow(Fl_Color col) fl_color(col); BP; vv(0.1,0.8); vv(0.9,0.0); vv(0.1,-0.8); EP; BP; vv(-0.5,0.8); vv(-0.1,0.8); vv(-0.1,-0.8); vv(-0.5,-0.8); EP; + set_outline_color(col); + BC; vv(0.1,0.8); vv(0.9,0.0); vv(0.1,-0.8); EC; + BC; vv(-0.5,0.8); vv(-0.1,0.8); vv(-0.1,-0.8); vv(-0.5,-0.8); EC; } static void draw_doublebar(Fl_Color col) { @@ -242,6 +264,10 @@ static void draw_doublearrow(Fl_Color col) BP; vv(-0.35,-0.4); vv(-0.35,0.4); vv(0.35,0.4); vv(0.35,-0.4); EP; BP; vv(0.15,0.8); vv(0.95,0.0); vv(0.15,-0.8); EP; BP; vv(-0.15,0.8); vv(-0.95,0.0); vv(-0.15,-0.8); EP; + set_outline_color(col); + BC; vv(-0.15,0.4); vv(0.15,0.4); vv(0.15,0.8); vv(0.95,0.0); + vv(0.15,-0.8); vv(0.15,-0.4); vv(-0.15,-0.4); vv(-0.15,-0.8); + vv(-0.95,0.0); vv(-0.15,0.8); EC; } static void draw_arrow(Fl_Color col) @@ -249,6 +275,9 @@ static void draw_arrow(Fl_Color col) fl_color(col); BP; vv(0.65,0.1); vv(1.0,0.0); vv(0.65,-0.1); EP; BL; vv(-1.0,0.0); vv(0.65,0.0); EL; + set_outline_color(col); + BL; vv(-1.0,0.0); vv(0.65,0.0); EL; + BC; vv(0.65,0.1); vv(1.0,0.0); vv(0.65,-0.1); EC; } #if 0 @@ -257,6 +286,9 @@ static void fl_draw_returnarrow(Fl_Color col) { fl_begin_polygon(); vv(-0.8,0.0); vv(-0.1,0.7); vv(-0.1,-0.7); fl_end_polygon(); + set_outline_color(col); + fl_begin_loop(); vv(-0.8,0.0); vv(-0.1,0.7); vv(-0.1,-0.7);fl_end_loop(); + fl_begin_line(); vv(-0.1,0.0); vv(0.8,0.0); vv(0.8,-0.7); fl_end_line(); } #endif @@ -264,7 +296,9 @@ static void draw_square(Fl_Color col) { rectangle(-1,-1,1,1,col); } static void draw_circle(Fl_Color col) { - fl_color(col); BP; fl_circle(0,0,1); EP; + fl_color(col); BP; fl_circle(0,0,1); EP; + set_outline_color(col); + BC; fl_circle(0,0,1); EC; } static void draw_line(Fl_Color col) @@ -275,6 +309,12 @@ static void draw_plus(Fl_Color col) fl_color(col); BP; vv(-0.9,-0.15); vv(-0.9,0.15); vv(0.9,0.15); vv(0.9,-0.15); EP; BP; vv(-0.15,-0.9); vv(-0.15,0.9); vv(0.15,0.9); vv(0.15,-0.9); EP; + set_outline_color(col); + BC; + vv(-0.9,-0.15); vv(-0.9,0.15); vv(-0.15,0.15); vv(-0.15,0.9); + vv(0.15,0.9); vv(0.15,0.15); vv(0.9,0.15); vv(0.9,-0.15); + vv(0.15,-0.15); vv(0.15,-0.9); vv(-0.15,-0.9); vv(-0.15,-0.15); + EC; } static void draw_uparrow(Fl_Color) { @@ -355,5 +395,5 @@ void Fl::enable_symbols() { } // -// End of "$Id: fl_symbols.cxx,v 1.6 1999/01/07 19:17:43 mike Exp $". +// End of "$Id: fl_symbols.cxx,v 1.7 1999/01/27 08:45:11 bill Exp $". // |
