On 11/26/2012 5:10 PM, Marco Patzer wrote:
2012-11-26 Sietse Brouwer:
Since I don't use MetaPost, I don't think I'm the best person to document this. But I took this as an opportunity to create the command reference pages for a bunch of the \...MP... commands; perhaps one of you could add this info to the proper page(s)?
Thanks. I added some info about the change mentioned in this thread.
Also: a question about \startuseMPgraphic and \startuniqueMPgraphic. Both are supposed to be recompiled at every usage, so how are they different? Actually trying it out suggests that useMPgraphic is the only one of the two that re-evaluates its code every time; compare the examples at
AFAIK useMPgraphic is always recalculated, reusableMPgraphic never is. uniqueMPgraphic takes the size into account and recalculates if the graphic dimensions change. If I recall correctly this is
Can be more than dimensions. This is the default hash: \def\overlaystamp {\overlaywidth :% \overlayheight:% \overlaydepth :% \MPcolor\overlaycolor:% \MPcolor\overlaylinecolor} so: width, height, depth, background color, line color but is one says \startuniqueMPgraphic{mygraphic}{linewidth,.....} given that linewidth is set, those values are also taken into account
mentioned somewhere in the MetaFun manual. But I agree, all these commands for including MP graphics are confusing, given the fact that one can survive pretty well with only useMPgraphic. I attached a small example to show the difference.
It does make a difference when you have documents with thousands of graphics (mkiv is much faster btw) and the pdf file is also smaller when reuse is applied Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------