\ graphics : line ( y2 x2 y1 x1 --) 41491 systrap 2drop 2drop ; : invert-line ( y2 x2 y1 x1 --) 41494 systrap 2drop 2drop ; : point ( y x --) 2dup line ; variable cx variable cy : rpoint ( y x --) cx @ + swap cy @ + swap point ; : point2 ( y x -- y x) 2dup 2dup swap rpoint rpoint ; : point4 ( y x -- y -x) point2 negate point2 ; : point8 ( y x --) point4 swap negate swap point4 2drop ; : -rot rot rot ; : ppoint4 ( y x -- ) cx @ 2dup + -rot - negate ( y ax2 ax1) rot cy @ 2dup + -rot - negate ( ax2 ax1 ay2 ay1 ) 2over >r over r> line -rot >r over r> line ; : ppoint8 ( y x --) 2dup swap ppoint4 ppoint4 ; variable line4 : (circle) ( radius cy cx --) cx ! cy ! dup negate >r 0 swap begin 2dup > invert while 2dup line4 @ execute over 2* 1+ r> + >r r@ 0 > if 1- r> over 2* - >r then swap 1+ swap repeat 2drop r> drop ; : circle ['] point8 line4 ! (circle) ; : pcircle ['] ppoint8 line4 ! (circle) ; : rounded-rectangle ( height width y x corner-radius --) >r sp@ r> rot rot \ WinDrawRectangle \ ( corner-radius daddr-rect --) 41496 systrap 2drop drop 2drop 2drop ; : rectangle ( height width y x --) 0 rounded-rectangle ;