[dev-context] metafun: colored dotlabel fails (fix included)

Hans Hagen pragma at wxs.nl
Wed Jul 25 14:04:07 CEST 2007


Sanjoy Mahajan wrote:

> The patch below fixes the minimal test case above as well as the
> larger real file that I started with:
> 
> --- a/metapost/context/base/mp-base.mp	2007-07-25 00:19:15.379198092 -0400
> +++ b/metapost/context/base/mp-base.mp	2007-07-25 00:19:37.072411646 -0400
> @@ -477,10 +477,10 @@
>  
>  def label = draw thelabel enddef;
>  newinternal dotlabeldiam; dotlabeldiam:=3bp;
> -vardef dotlabel@#(expr s,z) =
> -  label@#(s,z);
> +vardef dotlabel@#(expr s,z) text t_ =
> +  label@#(s,z) t_;
>    interim linecap:=rounded;
> -  draw z withpen pencircle scaled dotlabeldiam;
> +  draw z withpen pencircle scaled dotlabeldiam t_;
>  enddef;
>  def makelabel = dotlabel enddef;

ok, patched

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-context mailing list