Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #2013

Re: Constant line thickness after scale

From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.postscript
Subject Re: Constant line thickness after scale
Organization Decebal Computing
References <871trs1tlw.fsf@Equus.decebal.nl> <0ba7d7d7-5aba-4799-8dff-48a251f4ec7e@googlegroups.com>
Date 2014-09-04 10:42 +0200
Message-ID <87lhpzzshu.fsf@Equus.decebal.nl> (permalink)

Show all headers | View raw


Op Wednesday 3 Sep 2014 20:26 CEST schreef abeddie@hotmail.com:

> On Wednesday, September 3, 2014 2:09:23 PM UTC-4, Cecil Westerhof wrote:
>> With the following code I can draw an ellipse:
>>
>> 25  dup  translate
>>
>> 2  setlinewidth
>>
>> 4  1  scale
>>
>> 0  dup  4  0  360  arc   closepath   stroke
>>
>> showpage
>>
>>
>>
>> But at east and west the line thickness is bigger as at north and
>>
>> south. Is it possible to draw an ellipse which has a constant line
>>
>> thickness?
>>
>>
>>
>> --
>>
>> Cecil Westerhof
>>
>> Senior Software Engineer
>>
>> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
>
> Reverse the scale before calling stroke:
>
> 0  dup  4  0  360  arc   closepath   .25 1 scale stroke

Works like a charm. I used it for:
       4   4  translate
      20  20  translate
      gsave
          4 {
               4  1  scale
               0  dup  5  0  360  arc   closepath
              .25 1  scale
              stroke
              45  rotate
          } repeat
      grestore
      0  dup  5  0  360  arc  closepath   fill

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Constant line thickness after scale Cecil Westerhof <Cecil@decebal.nl> - 2014-09-03 19:50 +0200
  Re: Constant line thickness after scale abeddie <abeddie@hotmail.com> - 2014-09-03 11:26 -0700
    Re: Constant line thickness after scale Mark Carroll <mtbc@bcs.org> - 2014-09-03 19:35 +0100
    Re: Constant line thickness after scale Cecil Westerhof <Cecil@decebal.nl> - 2014-09-04 10:42 +0200
      Re: Constant line thickness after scale ken <ken@spamcop.net> - 2014-09-04 10:16 +0100
  Re: Constant line thickness after scale Mark Carroll <mtbc@bcs.org> - 2014-09-03 19:34 +0100
  Re: Constant line thickness after scale tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2014-09-03 20:46 -0400

csiph-web