Re: problem with drawoptions ?

Christophe Poulain <[email protected]> Thu, 6 Jul 2017 08:15:21 +0200
Newsgroups gmane.comp.tex.metapost
Message-ID <CAPDkhNNq42pHub1w+sa4PjcMi4m8rxnMMzU-oZmaB5X5XeDtjg@mail.gmail.com>
Thanks.
I didn't knew the real use of drawoptions...

Christophe

2017-07-05 22:53 GMT+02:00 Hans Hagen <[email protected]>:

> On 7/5/2017 10:05 PM, Christophe Poulain wrote:
>
>> Sorry for this question, but i must be tired...
>>
>> In this code (on metapost 1.999 - Debian
>> -----------------------
>> prologues:=2;
>>
>> beginfig(1);
>>    path seg;
>>    seg=(0,0)--(50,50);
>>    draw seg withcolor red;
>>    drawoptions(shifted (25,0));
>>    draw seg withcolor blue;
>>    drawoptions(shifted (50,0));
>>    draw seg withpen pencircle scaled 2bp;%*
>>    draw seg withpen pencircle scaled 2bp withcolor green;%*
>>    draw seg withcolor green withpen pencircle scaled 2bp;%*
>>    drawoptions();
>>    draw (seg shifted (75,0)) withpen pencircle scaled 2bp withcolor
>> red+green;
>> endfig;
>>
>> end
>> ----------------------
>>
>> why the drawoptions parameters not applied on the line %* ?
>>
> the drawoptions are applied to a path and the scaled and drawoptions is
> applied to the pen, like
>
>     path seg; seg=(0,0)--(50,50);
>     draw seg withcolor red withpen pencircle shifted (25,0);
>     draw seg withcolor blue withpen pencircle shifted (50,0);
>     draw seg withcolor green withpen pencircle;
>     draw seg withpen pencircle scaled 2bp shifted (50,0);%*
>
> (draw options is just text applied to a path / picture and normally
> contains a pen specification or color)
>
> Hans
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>

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