Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

There's coffee in that nebula! -- Capt. Kathryn Janeway, Star Trek: Voyager, "The Cloud"


devel / comp.lang.postscript / Re: Little idioms and conventions

SubjectAuthor
* Little idioms and conventionsluser droog
`- Re: Little idioms and conventionsjdaw1

1
Little idioms and conventions

<7e3f7b99-78c3-4670-b130-4be4d798c73bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=204&group=comp.lang.postscript#204

  copy link   Newsgroups: comp.lang.postscript
X-Received: by 2002:a05:620a:318e:b0:71f:b908:7b83 with SMTP id bi14-20020a05620a318e00b0071fb9087b83mr1316026qkb.15.1680717533166;
Wed, 05 Apr 2023 10:58:53 -0700 (PDT)
X-Received: by 2002:a05:6808:2807:b0:387:1afd:5924 with SMTP id
et7-20020a056808280700b003871afd5924mr1976407oib.8.1680717520404; Wed, 05 Apr
2023 10:58:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.postscript
Date: Wed, 5 Apr 2023 10:58:40 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=24.107.184.18; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.107.184.18
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7e3f7b99-78c3-4670-b130-4be4d798c73bn@googlegroups.com>
Subject: Little idioms and conventions
From: luser.droog@gmail.com (luser droog)
Injection-Date: Wed, 05 Apr 2023 17:58:53 +0000
Content-Type: text/plain; charset="UTF-8"
 by: luser droog - Wed, 5 Apr 2023 17:58 UTC

One little convention I've used a lot in PostScript code is to
use the variables /x /y /X /Y to hold the bounds. This can
look a little weird if you're used to using /x /y to hold some
notion of a "current point", but if you're using the `currentpoint`
for that then that frees up /x /y for this usage.

0 0 612 792 {Y X y x}{exch def}forall
/+= {exch 1 index load add store} def
/margin {dup neg /Y += dup neg /X += dup /y += /x +=} def

Then you can set text down the page by first subtracting the
linewidth or leading from Y and then showing a line at x,Y.

Another convention I've used for small illustrations is to
follow the model of a glyph in a font. Encapsulate the
drawing in a procedure which expects the currentpoint
to be the lower left on entry and leaves the currentpoint
at the lower right on exit. This makes it easy to place
several of them in a row.

[I thought I'd come up with more while typing these 2, but I
only had these 2 coming in.]

Re: Little idioms and conventions

<7687e671-de31-4662-8a9f-85f7c5202972n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=209&group=comp.lang.postscript#209

  copy link   Newsgroups: comp.lang.postscript
X-Received: by 2002:a05:620a:3712:b0:762:55da:9784 with SMTP id de18-20020a05620a371200b0076255da9784mr37348qkb.5.1688508094678;
Tue, 04 Jul 2023 15:01:34 -0700 (PDT)
X-Received: by 2002:a17:90a:fc86:b0:263:726:4856 with SMTP id
ci6-20020a17090afc8600b0026307264856mr10394941pjb.8.1688508094151; Tue, 04
Jul 2023 15:01:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.postscript
Date: Tue, 4 Jul 2023 15:01:33 -0700 (PDT)
In-Reply-To: <7e3f7b99-78c3-4670-b130-4be4d798c73bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=185.176.160.84; posting-account=Cp97SgoAAAC0t1Gya5PaPqyoafMoOtAn
NNTP-Posting-Host: 185.176.160.84
References: <7e3f7b99-78c3-4670-b130-4be4d798c73bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7687e671-de31-4662-8a9f-85f7c5202972n@googlegroups.com>
Subject: Re: Little idioms and conventions
From: jdawiseman@gmail.com (jdaw1)
Injection-Date: Tue, 04 Jul 2023 22:01:34 +0000
Content-Type: text/plain; charset="UTF-8"
 by: jdaw1 - Tue, 4 Jul 2023 22:01 UTC

On Wednesday, 5 April 2023 at 18:58:54 UTC+1, luser droog wrote:
> One little convention I've used a lot in PostScript code is to
> use the variables /x /y /X /Y to hold the bounds.

My convention is L R B T for bounds left tight bottom top.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor