29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

64<br />

Sometimes it's handy to temporarily set aside the current picture.<br />

draw fullcircle scaled 1cm withpen pencircle scaled 1mm withcolor .625red ;<br />

currentpicture := currentpicture slanted .5 ;<br />

pushcurrentpicture ;<br />

draw fullcircle scaled 1cm withpen pencircle scaled 1mm withcolor .625yellow ;<br />

currentpicture := currentpicture slanted -.5 ;<br />

popcurrentpicture ;<br />

These are METAFUN commands but METAPOST itself comes with a variant, image, and you explicitly<br />

have to draw this picture (or otherwise add it to the currentpicture).<br />

draw fullcircle scaled 1cm withpen pencircle scaled 1mm withcolor .625red ;<br />

currentpicture := currentpicture slanted .5 ;<br />

draw image (<br />

draw fullcircle scaled 1cm<br />

withpen pencircle scaled 1mm withcolor .625yellow ;<br />

currentpicture := currentpicture slanted -.5 ;<br />

) ;<br />

Each graphic starts fresh with an empty current picture. In METAFUN we make sure that we also<br />

reset some otherwise global variables, like color, pen and some line properties.<br />

Welcome to MetaPost Current picture

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!