Hi, how to specify a particular MP instance for a MPpage? \defineMPinstance [myinstance] [metafun] [textcolor=green] \starttext \startMPpage draw textext("Foo") scaled 1cm; \stopMPpage \stoptext Marco
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Marco Patzer