Discussion:
Scaling mpgraphics
Patrick Gundlach
2001-11-07 22:34:56 UTC
Permalink
Hi,

how do I scale my metafun graphics?
I use

\startuseMPgraphic{one}
....
\stopuseMPgraphic

and want to place it with

\placefigure[right]{none}{\useMPgraphic{one}}
Text ....

and I want to scale it to some size. What is the appropriate way?
\framed[...]{...} did not work (graphic stayed the same size}
Should I put some scaling commands inside the mp graphics and use the
\MPvar{width/height} variables? Or shall I do something with
\externalfigure?
--
Viele Grüße,

Patrick Gundlach
Hans Hagen
2001-11-08 09:25:21 UTC
Permalink
Post by Patrick Gundlach
Hi,
how do I scale my metafun graphics?
I use
\startuseMPgraphic{one}
....
\stopuseMPgraphic
and want to place it with
\placefigure[right]{none}{\useMPgraphic{one}}
Text ....
and I want to scale it to some size. What is the appropriate way?
\framed[...]{...} did not work (graphic stayed the same size}
Should I put some scaling commands inside the mp graphics and use the
\MPvar{width/height} variables? Or shall I do something with
\externalfigure?
Take your choice:

\scale
[sx=.5,sy=.3]
{\startMPcode
fill fullcircle scaled 10cm ;
\stopMPcode}

\startbuffer [patrick]
\startMPcode
fill fullcircle scaled 10cm ;
\stopMPcode
\stopbuffer

\externalfigure[patrick][type=buffer,width=2cm]

as you can see any buffer can be scaled so this is a way to scale down a
table too

Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | ***@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
Patrick Gundlach
2001-11-11 15:47:37 UTC
Permalink
Good afternoon,
Post by Hans Hagen
\scale
[sx=.5,sy=.3]
{\startMPcode
fill fullcircle scaled 10cm ;
\stopMPcode}
This works fine! Just weren't able to find it in the doc..:)
Post by Hans Hagen
\startbuffer [patrick]
\startMPcode
fill fullcircle scaled 10cm ;
\stopMPcode
\stopbuffer
\externalfigure[patrick][type=buffer,width=2cm]
I forgot about the posibility to put the \startMPcode inside a buffer. I
thought scaling a buffer was limited to text and regular TeX stuff, but I
am thinking (once again) too limited.

Patrick, again amazed.

Loading...