Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1832
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: How to get smote lines |
| Organization | Decebal Computing |
| References | <87d2h8y8oj.fsf@Equus.Decebal.nl> <b0986275-83a7-45de-918d-f68c9daf308f@googlegroups.com> |
| Date | 2014-03-27 03:47 +0100 |
| Message-ID | <8738i4xsqg.fsf@Equus.Decebal.nl> (permalink) |
Op Wednesday 26 Mar 2014 22:52 CET schreef luser:
> On Wednesday, March 26, 2014 4:03:08 PM UTC-5, Cecil Westerhof wrote:
>> I have the following code:
>>
>> %!PS-Adobe-3.0 EPSF-3.0
>> %%BoundingBox: 0 0 100 25
>>
>> 30 12 90 {
>> gsave
>> 0 translate
>> -11 6 moveto
>> 0 6 rlineto
>> 6 0 rlineto
>> 0 -6 rlineto
>> 6 0 rlineto
>> stroke
>> grestore
>> } for
>>
>> showpage
>>
>> But I noticed that the connection is not smooth. When I change the
>> last rlineto to:
>> 7 0 rlineto
>>
>> It goes to far. How can I get a smooth connection?
>>
>
> The usual best answer is to construct one big path and make
> a single call to `stroke`. But you've kind of painted yourself
> into a corner with the gsave...grestore. So, I think the
> simplest fix here is add 1/2 of the line-width.
>
>
> 10 10 scale
> 0 10 translate % just to see it better
>
> 30 12 90 {
> gsave
> 0 translate
> -11 6 moveto
> 0 6 rlineto
> 6 0 rlineto
> 0 -6 rlineto
> currentlinewidth .5 mul
> 6 add 0 rlineto
> stroke
> grestore
> } for
>
> showpage
The idea of working with:
2 setlinejoin
2 setlinecap
works better. (And is also only needed on one point.) But thanks anyway.
--
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 get smote lines Cecil Westerhof <Cecil@decebal.nl> - 2014-03-26 22:03 +0100
Re: How to get smote lines Mark Carroll <mtbc@bcs.org> - 2014-03-26 21:49 +0000
Re: How to get smote lines Cecil Westerhof <Cecil@decebal.nl> - 2014-03-27 03:45 +0100
Re: How to get smote lines luser- -droog <mijoryx@yahoo.com> - 2014-03-26 14:52 -0700
Re: How to get smote lines Cecil Westerhof <Cecil@decebal.nl> - 2014-03-27 03:47 +0100
Re: How to get smote lines Don Lancaster <don@tinaja.com> - 2014-04-02 12:21 -0700
Re: How to get smote lines luser- -droog <mijoryx@yahoo.com> - 2014-04-02 19:17 -0700
csiph-web