Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1989
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: How to rewrite this |
| Organization | Decebal Computing |
| References | <87fvgs5s5w.fsf@Equus.decebal.nl> <c5jdtpFh05lU1@mid.uni-berlin.de> |
| Date | 2014-08-20 15:28 +0200 |
| Message-ID | <87wqa347e0.fsf@Equus.decebal.nl> (permalink) |
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
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to rewrite this Cecil Westerhof <Cecil@decebal.nl> - 2014-08-19 19:02 +0200
Re: How to rewrite this jdaw1 <jdawiseman@gmail.com> - 2014-08-20 00:43 -0700
Re: How to rewrite this Herbert Voss <Herbert.Voss@alumni.tu-berlin.de> - 2014-08-20 13:08 +0200
Re: How to rewrite this Cecil Westerhof <Cecil@decebal.nl> - 2014-08-20 15:28 +0200
Re: How to rewrite this tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2014-08-30 01:47 -0400
Re: How to rewrite this luser- -droog <mijoryx@yahoo.com> - 2014-08-29 23:43 -0700
Re: How to rewrite this luser- -droog <mijoryx@yahoo.com> - 2014-08-30 01:23 -0700
Re: How to rewrite this Terry White <TW382@aol.com> - 2014-09-01 09:43 +0100
Re: How to rewrite this luser- -droog <mijoryx@yahoo.com> - 2014-09-01 18:20 -0700
Re: How to rewrite this Terry White <TW382@aol.com> - 2014-09-02 11:58 +0100
csiph-web