From: Hans Hagen <pragma@wxs.nl>
Subject: some secret mp commands
Date: Mon, 16 Oct 2000 09:39:38 +0200 [thread overview]
Message-ID: <3.0.6.32.20001016093938.00aa82e0@pop.wxs.nl> (raw)
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
-------------------------------------------------------------------------
reply other threads:[~2000-10-16 7:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3.0.6.32.20001016093938.00aa82e0@pop.wxs.nl \
--to=pragma@wxs.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).