Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #3411
| Newsgroups | comp.lang.postscript |
|---|---|
| Date | 2019-06-26 08:11 -0700 |
| References | <d64c60d0-3acc-40ed-8fab-fef62a240668@googlegroups.com> |
| Message-ID | <1df74870-fd0b-4aed-bdec-db4d0e640da2@googlegroups.com> (permalink) |
| Subject | Re: What's arcto good for? |
| From | edspikechapman@gmail.com |
On Tuesday, June 25, 2019 at 6:29:58 PM UTC-4, luser droog wrote:
> What's 'arcto' good for? It arose mysteriously after the original red book
> apparently to help make rounded corners for screen windows and boxes.
> But I could never figure out how to use it. Does anybody use it?
>
> It seems like it might be applicable to my issue in Julian's thread about
> the stylized '9' where I have the spans from one side of a strokepath but
> no joins.
%!
% draw rectangle with rounded corner : x y width height radius
/rectar {
4 index 3 index 2 div add % x y w h r (x + w/2)
4 index % x y w h r x y
moveto % x y w h r
4 index 3 index add 4 index % x y w h r x2 y2
1 index 1 index 5 index neg add % x y w h r x2 y2 x3 y3
4 index % x y w h r x2 y2 x3 y3 r
arcto 4 {pop} repeat % x y w h r
4 index 3 index add % x y w h r x3
4 index 3 index neg add % x y w h r x3 y3
6 index 1 index % x y w h r x3 y3 x4 y4
4 index % x y w h r x3 y3 x4 y4 r
arcto 4 {pop} repeat % x y w h r
4 index 4 index 3 index neg add % x y w h r x4 y4
6 index 6 index % x y w h r x4 y4 x y
4 index
arcto 4 {pop} repeat % x y w h r
4 index 4 index % x y w h r x y
1 index 5 index add 1 index % x y w h r x y x2 y2
4 index
arcto 4 {pop} repeat % x y w h r
closepath
5 {pop} repeat % clean stack
stroke
} def
/wid 10 def
wid setlinewidth
/x 400 def
/y 400 def
/dx 100 def
/dy 50 def
/rad wid def
x y dx dy rad rectar
showpage
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar
What's arcto good for? luser droog <luser.droog@gmail.com> - 2019-06-25 15:29 -0700 Re: What's arcto good for? edspikechapman@gmail.com - 2019-06-26 08:11 -0700 Re: What's arcto good for? Mark Carroll <mtbc@bcs.org> - 2019-06-29 09:17 +0100 Re: What's arcto good for? John Reiser <vendor@BitWagon.com> - 2019-06-29 07:23 -0700
csiph-web