From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Paul Menzel <paulepanter@users.sourceforge.net>
Subject: Re: MetaPost: Confusion with `function()` and `xyscaled`
Date: Sun, 23 Oct 2011 23:39:14 +0200 [thread overview]
Message-ID: <4EA48982.7050903@wxs.nl> (raw)
In-Reply-To: <4EA42FED.7040700@gmx.net>
On 23-10-2011 17:17, Peter Rolf wrote:
> If I want to test the bounding box of a graphic, I normally use a small
> debugging macro (last code line of nearly all of my graphics). It simply
> draws a small red frame at the bounding box borders. You can use the
> 'Measuring Tool' in Acrobat (also Reader?) or even better the 'Object
> Inspector' to get the exact size.
>
> minlinewidth:= .143pt;
>
> def wirepen= pencircle scaled minlinewidth enddef ;
>
> def drawbb =
> drawoptions() ;
> interim linejoin:= mitered;
> draw (llcorner currentpicture) shifted ( .5minlinewidth,
> .5minlinewidth)
> -- (lrcorner currentpicture) shifted (-.5minlinewidth,
> .5minlinewidth)
> -- (urcorner currentpicture) shifted
> (-.5minlinewidth,-.5minlinewidth)
> -- (ulcorner currentpicture) shifted (
> .5minlinewidth,-.5minlinewidth
)
> -- cycle
> withpen wirepen withcolor red;
> % draw boundingbox currentpicture withpen wirepen withcolor red ; % was
> not neutral!
> enddef ;
draw boundingbox currentpicture enlarged -.5minlinewidth withpen wirepen
withcolor red ;
> My fault. In the meantime I have checked it and 'sp' is not a predefined
> constant in MP (couldn't find it in the manual). Also never used it in MP.
>
>>> 1 = 1pt = 65536sp
sp's would overflow anyway
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2011-10-23 21:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 23:14 MetaFun: " Paul Menzel
2011-10-21 11:38 ` Paul Menzel
2011-10-21 15:02 ` Peter Rolf
2011-10-21 15:26 ` MetaPost: " Paul Menzel
2011-10-21 16:08 ` Peter Rolf
2011-10-23 14:12 ` Paul Menzel
2011-10-23 15:17 ` Peter Rolf
2011-10-23 21:39 ` Hans Hagen [this message]
2011-10-21 20:53 ` MetaFun: " Aditya Mahajan
2011-10-22 7:24 ` Hans Hagen
2011-10-23 13:17 ` MetaFun manual: Incorrect label of ordinate axis on page 382, section 9.3 drawing functions (was: Confusion with `function()` and `xyscaled`) Paul Menzel
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=4EA48982.7050903@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
--cc=paulepanter@users.sourceforge.net \
/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).