Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #2334
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Carlos <angus@quovadis.com.ar> |
| Newsgroups | comp.lang.postscript |
| Subject | Re: Anticlip |
| Date | Tue, 1 Sep 2015 22:38:33 +0200 |
| Organization | A noiseless patient Spider |
| Lines | 91 |
| Message-ID | <20150901223833.219fe870@samara.DOMA> (permalink) |
| References | <1114446133.473394.163500@o13g2000cwo.googlegroups.com> <426d3ecd.809318318@read.news.uk.uu.net> <1114456154.181295.211860@o13g2000cwo.googlegroups.com> <d4jn02$pjr$1$8300dec7@news.demon.co.uk> <1114476474.211676.285770@o13g2000cwo.googlegroups.com> <gJednQ-2MPAgDejfRVn-iw@forethought.net> <1115151731.278776.216660@z14g2000cwz.googlegroups.com> <d58ukh$7cb$1$8300dec7@news.demon.co.uk> <1115213639.623011.169930@z14g2000cwz.googlegroups.com> <9bb78240-1232-4a4e-b5b0-0f3dc7a6fc56@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| Injection-Info | mx02.eternal-september.org; posting-host="82e0b2bf4c14e7be33ce915a2d173c51"; logging-data="3004"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IraJooZuCoPcSZq9xNRGfBvN2nWO1xI8=" |
| X-Newsreader | Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) |
| Cancel-Lock | sha1:AFumaBNoKsiiGAsYS83B4ZsSCew= |
| Xref | csiph.com comp.lang.postscript:2334 |
Show key headers only | View raw
[jdaw1 <jdawiseman@gmail.com>, 2015-08-31 15:55]
> Because I still want it, please allow me to re-ask this 10¼ years
> later.
>
> The Problem
>
> • There is a background that cannot be re-painted. Just assume that
> it cannot be re-painted.
>
> • There a currentpath, easily regeneratable. Or, equivalently, there
> is accessible code that generates the currentpath.
>
> • What is wanted is to do the partial stroke of this path that is
> ≤6pt from the path, but >5pt.
>
> • To make matters worse, the path is typically generated by charpath,
> so might be complicated, and its strokepath is sure to be nastily
> self-intersecting.
>
> ◊ If the background were certain to be empty white (but it isn’t),
> this could be done with gsave 12 setlinewidth 0 setgray stroke
> grestore 10 setlinewidth 1 setgray stroke which is how it is
> currently done, quite unsatisfactorily.
>
> ◊ If there were an anticlip operator (but there isn’t), it could be
> done with gsave 10 setlinewidth strokepath anticlip regeneratepath 12
> setlinewidth 0 setgray stroke grestore newpath
>
> ••• But, neither of these cases applies. Please, have you any ideas
> as to how to achieve this over a non-repaintable background?
Ghostscript supports PDF transparency. Here is an example; it requires
the background to be painted after the foreground.
HTH
%!
/W 200 def
/H 150 def
<< /PageSize [ W H ] >> setpagedevice
/draw-bg {
4 20 H {
10 20 W {
2 copy mul W H mul div 0.5 0.6 sethsbcolor
1 index
8 0 360 arc
fill
} for
} for
} def
/draw-fg {
30 30 moveto W 30 sub H 30 sub lineto
W H 2 div W 0 W 2 div H 2 div curveto
0 H 0 H 2 div 30 30 curveto
closepath
} def
% no transparency
gsave
draw-bg
draw-fg
gsave 12 setlinewidth 0 setgray stroke grestore
10 setlinewidth 1 setgray stroke
grestore
showpage
% transparency
gsave
draw-fg
gsave 12 setlinewidth 0 setgray stroke grestore
10 setlinewidth 1 setgray stroke
/Darken .setblendmode
draw-bg
grestore
showpage
--
Back to comp.lang.postscript | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Anticlip jdaw1 <jdawiseman@gmail.com> - 2015-08-31 15:55 -0700 Re: Anticlip jdaw1 <jdawiseman@gmail.com> - 2015-08-31 16:27 -0700 Re: Anticlip Carlos <angus@quovadis.com.ar> - 2015-09-01 22:38 +0200
csiph-web