On 2/23/2013 9:03 PM, Marco Patzer wrote:
\defineMPinstance
   [myinstance]
   [metafun]
   [textcolor=green]

\starttext
   \startMPpage
     draw textext("Foo") scaled 1cm;
   \stopMPpage
\stoptext

You can add this to cont-new.mkiv:

\unprotect

\def\c!instance{instance}

\unexpanded\def\meta_process_graphic_instance#1%
  {\edef\currentMPinstance{#1}%
   \ifx\currentMPinstance\empty
     \let\currentMPinstance\defaultMPinstance
   \fi
   \edef\currentMPformat{\MPinstanceparameter\s!format}%
   \meta_process_graphic}

\definefittingpage
  [MPpage]
  [\c!align=,

\c!command=\meta_process_graphic_instance{\fittingpageparameter\c!instance},
   \c!instance=]

\unprotect

and then do:

\defineMPinstance
  [myinstance]
  [metafun]
  [textcolor=green]

\starttext
  \startMPpage[instance=myinstance,offset=1cm]
    fill fullcircle scaled 10cm ;
    draw textext("Foo") scaled 1cm;
  \stopMPpage
\stoptext



--

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to