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


Groups > comp.lang.postscript > #3411

Re: What's arcto good for?

X-Received by 2002:a05:620a:687:: with SMTP id f7mr4404635qkh.238.1561561906444; Wed, 26 Jun 2019 08:11:46 -0700 (PDT)
X-Received by 2002:ac8:2a0a:: with SMTP id k10mr4383368qtk.148.1561561906277; Wed, 26 Jun 2019 08:11:46 -0700 (PDT)
Path csiph.com!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!m24no2747428qtm.0!news-out.google.com!4ni133qtw.1!nntp.google.com!m24no2747416qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.postscript
Date Wed, 26 Jun 2019 08:11:45 -0700 (PDT)
In-Reply-To <d64c60d0-3acc-40ed-8fab-fef62a240668@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=13.13.137.2; posting-account=WBH6cQoAAAAx76SDxyOY-kxa5l426Qup
NNTP-Posting-Host 13.13.137.2
References <d64c60d0-3acc-40ed-8fab-fef62a240668@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <1df74870-fd0b-4aed-bdec-db4d0e640da2@googlegroups.com> (permalink)
Subject Re: What's arcto good for?
From edspikechapman@gmail.com
Injection-Date Wed, 26 Jun 2019 15:11:46 +0000
Content-Type text/plain; charset="UTF-8"
X-Received-Bytes 2888
X-Received-Body-CRC 1425874124
Xref csiph.com comp.lang.postscript:3411

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar


Thread

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