Re: envelope

"Daniel H. Luecking" <[email protected]>
Newsgroups gmane.comp.tex.metapost
Message-ID <[email protected]>
Nicola,

I should have added that there has been a long-standing bug in 
 envelope  and the related  withpen  operator. A classical 
example is
    path P;
    pen A;
    P:=(0,0){up}..(100,0){down}..cycle;
    A:=pensquare scaled 10;
    draw P withpen A;

That still seems to exhibit the bug (at least in metapost 1.9991 of TeX Live 2016).
Also, one needs to do
   fill (envelope A of P) .. (envelop A of reverse P)..cycle
to get the effect of 
   draw P withpen A.

Cheers,

Daniel H. Luecking [[email protected]]
Department of Mathematical Sciences
1 University of Arkansas
Fayetteville, AR, USA 72701-1201

________________________________________
From: metapost <[email protected]> on behalf of Nicola <[email protected]>
Sent: Friday, September 16, 2016 5:41 AM
To: [email protected]
Subject: Re: [metapost] envelope

On 2016-09-16 07:06:19 +0000, Hans Hagen said:

> On 9/15/2016 8:27 PM, Daniel H. Luecking wrote:
>> Nicola:
>>
>> The syntax is
>> envelope <polygonal pen> of <path primary>
>>
>> For example,
>> path p;
>> p := envelope pensquare of (up--left);
>>
>> It returns the path which, when filled, produces the effect of stroking
>> the pen along the path. Elliptical pens (e.g., pencircle) produce an error.
>>
>> Stroking an elliptical pen is simply passed on to PostScript. But polygonal
>> pens (inherited from metafont) require this as a workaround.
>>
>> I deduced this by a little trial and error based on some descriptions in
>> the web source mp.w.
>
> Here's what happens in the result.
>
> [snip]

Thanks for the illuminating examples!
Nicola


--
http://tug.org/metapost/

--
http://tug.org/metapost/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.