[metapost] problem with drawoptions ?
Christophe Poulain
chrpoulain at gmail.com
Thu Jul 6 08:15:21 CEST 2017
Thanks.
I didn't knew the real use of drawoptions...
Christophe
2017-07-05 22:53 GMT+02:00 Hans Hagen <pragma at wxs.nl>:
> 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
> -----------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/metapost/attachments/20170706/66c88abc/attachment.html>
More information about the metapost
mailing list