Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news.panservice.it!feed.xsnews.nl!border01.ams.xsnews.nl!feeder01.ams.xsnews.nl!frontend-F10-10.ams.news.kpn.nl From: Cecil Westerhof Newsgroups: comp.lang.postscript Subject: Re: How to rewrite this Organization: Decebal Computing References: <87fvgs5s5w.fsf@Equus.decebal.nl> X-Face: "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR,v+Pti8=Vi/Z"g^?b"E X-Homepage: http://www.decebal.nl/ Date: Wed, 20 Aug 2014 15:28:55 +0200 Message-ID: <87wqa347e0.fsf@Equus.decebal.nl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:uYXqoeiXMnSagHBIaOApdMrBlZM= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 40 NNTP-Posting-Host: 77.171.42.144 X-Trace: 1408541471 news.kpn.nl 15907 77.171.42.144@kpn/77.171.42.144:37615 Xref: csiph.com comp.lang.postscript:1989 Op Wednesday 20 Aug 2014 13:08 CEST schreef Herbert Voss: >> I thought to rewrite this neatly like this: >> gsave >> 20 20 translate >> 4 { >> -5 -5 moveto >> 0 -20 lineto >> 5 -5 lineto >> 90 rotate >> } repeat >> closepath >> fill >> grestore >> >> But then only four triangles are filled and the square in the >> middle is not. I could of-course fill the square also, but I was >> wondering if there is a better way. > > > 200 200 translate > 10 dup scale > -5 -5 moveto > 4 { > 5 -15 rlineto > 5 15 rlineto > 90 rotate > } repeat > closepath > fill How stupid of me, I put the moveto in the loop instead of before it. >:-( Thanks a bundle. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof