[NTG-context] Can I share METAPOST vardefs over multiple pages?
gerben.wierda at rna.nl
Fri Mar 13 12:53:46 CET 2020
Suppose I have this code:
vardef MyShape(expr w, h) =
save pth; path pth ;
save pic; picture pic;
pth = fullsquare xysized (w, h);
pic := image (
% all kind of stuff here
setbounds pic to pth;
picture s ; s := MyShape(4cm, 2cm);
drawdot center leftboundary s withpen pencircle scaled 2 withcolor green;
drawdot center rightboundary s withpen pencircle scaled 2 withcolor blue;
drawdot point .25 along topboundary s withpen pencircle scaled 2 withcolor yellow;
drawdot .25[llcorner s, lrcorner s] withpen pencircle scaled 2 withcolor magenta;
drawdot origin withpen pencircle scaled 2 withcolor red;
Can I reuse that varied across follow-up MPPages?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ntg-context