meta-fig.mkii / last modification: 2020-01-30 14:15
%D \module
%D   [       file=meta-fig,
%D        version=2000.09.07,
%D          title=\METAPOST\ Graphics,
%D       subtitle=Stand Alone Graphics,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{MetaPost Graphics / Stand Alone Graphics}


%D This module implements a method for defining
%D stand||alone||graphics, that is, each graphic gets is own
%D page. Because graphics are wrapped in a \type {\framed},
%D you can add overlays to the graphic directly, and since the
%D whole \CONTEXT\ machinery is available, you can also add
%D page backgrounds.
%D \starttyping
%D \setupMPpage
%D   [offset=1pt,
%D    background=color,
%D    backgroundcolor=green]
%D \startMPpage
%D   fill fullcircle scaled 10cm withcolor red ;
%D \stopMPpage
%D \startMPpage
%D   fill fullsquare rotated 45 scaled 8cm withcolor blue ;
%D \stopMPpage
%D \stoptyping
%D Although this is hardly of any use, you can mix these
%D definitions with the text flow, since all settings are
%D kept local. The page is clipped to the image size.




\long\def\dostartMPpage[#1][#2]% second arg gobbles space


\let\stopMPpage \relax % so that we can use it in \expanded


%D \macros
%D  {MPfigure}
%D A bit out of place, here but nevertheless:

\def\MPfigure#1#2% test for dup figure
   \getfiguredimensionsonly[#1]% [\c!object=\v!no] already set
     externalfigure "#1"
       xscaled \figurewidth\space
       yscaled \figureheight\space
       #2 ;

\protect \endinput