From f9039b2ae21988783feae9b362818e7923e82d14 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 6 Oct 1998 18:21:25 +0000 Subject: Initial revision git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_rounded_box.cxx | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/fl_rounded_box.cxx (limited to 'src/fl_rounded_box.cxx') diff --git a/src/fl_rounded_box.cxx b/src/fl_rounded_box.cxx new file mode 100644 index 000000000..f670726c1 --- /dev/null +++ b/src/fl_rounded_box.cxx @@ -0,0 +1,75 @@ +/* fl_rounded_box.C + + Less-used box types are in seperate files so they are not linked + in if not used. + +*/ + +#include +#include + +#define RN 5 +#define RS 15 +#define BW 3 + +static double offset[RN] = { 0.0, 0.07612, 0.29289, 0.61732, 1.0}; + +static void rbox(int fill, int x, int y, int w, int h) { + int i; + int rsx ,rsy, rs; + rsx = w*2/5; rsy = h*2/5; + if (rsx > rsy) rs = rsy; else rs = rsx; + if (rs > RS) rs = RS; + rsx = rs; rsy = rs; + + if (fill) fl_begin_polygon(); else fl_begin_loop(); + for (i=0; i