1 \ Words implementing frame drawing
2 \ XXX Filled boxes are left as an exercise for the reader... ;-/
3 \ $FreeBSD: src/sys/boot/forth/frames.4th,v 1.1 2003/05/30 09:29:23 scottl Exp $
4 \ $DragonFly: src/sys/boot/forth/frames.4th,v 1.1 2003/11/10 06:08:34 dillon Exp $
32 32 constant fill_blank
33 176 constant fill_dark
35 178 constant fill_bright
38 : hline ( len x y -- ) \ Draw horizontal single line
45 : f_single ( -- ) \ set frames to single
54 : f_double ( -- ) \ set frames to double
63 : vline ( len x y -- ) \ Draw vertical single line
74 : box ( w h x y -- ) \ Draw a box
75 2dup 1+ 4 pick 1- -rot
76 vline \ Draw left vert line
77 2dup 1+ swap 5 pick + swap 4 pick 1- -rot
78 vline \ Draw right vert line
79 2dup swap 1+ swap 5 pick 1- -rot
80 hline \ Draw top horiz line
81 2dup swap 1+ swap 4 pick + 5 pick 1- -rot
82 hline \ Draw bottom horiz line
83 2dup at-xy lt_el @ emit \ Draw left-top corner
84 2dup 4 pick + at-xy lb_el @ emit \ Draw left bottom corner
85 2dup swap 5 pick + swap at-xy rt_el @ emit \ Draw right top corner
86 2 pick + swap 3 pick + swap at-xy rb_el @ emit