All, I've always wondered why this Metafun manual example doesn't work. \startMPgraphic draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm withcolor .625 red; \stopMPgraphic \hbox\bgroup \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup
Hi David, To me it looks like it does work, but perhaps I am not looking at it correctly. Here is what I compiled: \setupcolors[state=start] \setupoutput[pdftex] \starttext \startMPgraphic draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm withcolor .625 red; \stopMPgraphic \hbox\bgroup \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup \stoptext And I get a red outline around two rectangles next to eachother. Does it crash for you? Taco David Arnold wrote:
All,
I've always wondered why this Metafun manual example doesn't work.
\startMPgraphic draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm withcolor .625 red; \stopMPgraphic
\hbox\bgroup \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
It compiles, but the figures should not be identical according to the Metafun manual, page 201. On Dec 18, 2005, at 1:01 AM, Taco Hoekwater wrote:
Hi David,
To me it looks like it does work, but perhaps I am not looking at it correctly. Here is what I compiled:
\setupcolors[state=start] \setupoutput[pdftex] \starttext \startMPgraphic draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm withcolor .625 red; \stopMPgraphic \hbox\bgroup \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup \stoptext
And I get a red outline around two rectangles next to eachother. Does it crash for you?
Taco
David Arnold wrote:
All, I've always wondered why this Metafun manual example doesn't work. \startMPgraphic draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm withcolor .625 red; \stopMPgraphic \hbox\bgroup \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
David Arnold wrote:
It compiles, but the figures should not be identical according to the Metafun manual, page 201.
Ah, I see now. The second argument is dropped, because it was assumed that it was never actually used. See the two disjunct definitions of \insertMPfile in supp-mps.tex (the version documented in the metafun manual) versus the one in in meta-ini.tex (the version that is actually used). Taco
Taco Hoekwater wrote:
David Arnold wrote:
It compiles, but the figures should not be identical according to the Metafun manual, page 201.
Ah, I see now. The second argument is dropped, because it was assumed that it was never actually used. See the two disjunct definitions of \insertMPfile in supp-mps.tex (the version documented in the metafun manual) versus the one in in meta-ini.tex (the version that is actually used).
indeed, a substantial speed optimization -) so ... i need to change the metafun example to use scaling instead Hans
Taco Hoekwater wrote:
Hi David,
To me it looks like it does work, but perhaps I am not looking at it correctly. Here is what I compiled:
\setupcolors[state=start] \setupoutput[pdftex] \starttext \startMPgraphic draw unitsquare xscaled 5cm yscaled 1cm withpen pencircle scaled 2mm withcolor .625 red; \stopMPgraphic \hbox\bgroup \loadcurrentMPgraphic{width=5cm,height=1cm}\placeMPgraphic\quad \loadcurrentMPgraphic{width=8cm,height=1cm}\placeMPgraphic\egroup \stoptext
And I get a red outline around two rectangles next to eachother.
i will change that example (or maybe some other low level code -) Hans
participants (3)
-
David Arnold
-
Hans Hagen
-
Taco Hoekwater