Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: Yet another draw of rectangle Date: Sun, 20 Nov 2016 01:18:48 -0800 Organization: A noiseless patient Spider Lines: 18 Message-ID: <877f7ycxvr.fsf@nightsong.com> References: <87bmxadcl7.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="4a8e12b9b1b368f8d5b968032e549542"; logging-data="6682"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18enPAWr6BkTsPg9SrB0nH4" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:GGcnwkjqY9X/DMhRyrGfhdixihc= sha1:JLSUu/r0FJoa90HkJmLFXXB5K4E= Xref: csiph.com comp.lang.forth:52753 Paul Rubin writes: > : rect ( x0 y0 x1 y1 ) ... > 2drop LINE ; I didn't try hard enough to get rid of some stack motion earlier. Of course this is shorter: : rect ( x0 y0 x1 y1 ) 2over 2over ( x0 y0 x1 y1 x0 y0 x1 y1 ) -rot swap ( x0 y0 x1 y1 x0 y1 x1 y0 ) LINE ( x0 y0 x1 y1 x0 y1 ) 2swap LINE ( x0 y0 x0 y1 ) LINE ( x0 y0 ) LINE ; Maybe a little more rearrangement is possible.