[metapost] problem with drawoptions ?
Hans Hagen
pragma at wxs.nl
Wed Jul 5 22:53:33 CEST 2017
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
-----------------------------------------------------------------
More information about the metapost
mailing list