From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/2999 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: some secret mp commands Date: Mon, 16 Oct 2000 09:39:38 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20001016093938.00aa82e0@pop.wxs.nl> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035393765 13448 80.91.224.250 (23 Oct 2002 17:22:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:22:45 +0000 (UTC) Original-To: ntg-context@ntg.nl Xref: main.gmane.org gmane.comp.tex.context:2999 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:2999 Hi mp friends, While I was playing a bit with the graph macros that come with mpost [actually, extending the format package] i uncovered some commands that are not defined in the mp manual, but nevertheless quite interesting. I will cover them in the metafun manual, but here is already an impression: vardef inverted expr p = save pp ; picture pp ; pp := nullpicture ; for i within p : addto pp if stroked i : doublepath else : contour fi pathpart i dashed dashpart i withpen penpart i withcolor white-(redpart i, greenpart i, bluepart i) ; endfor ; pp enddef ; beginfig(1) colorcircle(10cm,red,green,blue) ; currentpicture := inverted currentpicture ; endfig ; So, one can disassemble a picture using a within loop and *part primitives! Another one is truecorners but I still have to find out what it does. [i found a few more by browsing the mp.pool file, like fontsize that reports the real font size [so something infont "string" at size is now possible.] Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE 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 -------------------------------------------------------------------------