From: alan.caruanambom@gmail.com
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: MetaPost background
Date: Tue, 23 Jul 2024 19:13:14 -0000 [thread overview]
Message-ID: <172176199456.854231.5106918044533716491@cgl.ntg.nl> (raw)
In-Reply-To: <1a05f8af-9e23-0139-1c7b-90f9787322d1@gmail.com>
The frame is only for reference, what I need is that the background is not wider than or higher than the frame, changing the coordinates of the points can be done but I remember seeing an example in which using "shifted" it could be done move to a corner, without worrying about the coordinates or point size
\startuseMPgraphic{fullheightbackground}
fill unitsquare xyscaled (OverlayWidth, OverlayHeight) withcolor "gray" ;
w := MakeupWidth;
h := OverlayHeight;
draw (0,0)--(w,0) withpen pencircle scaled 2pt withcolor green;
draw (0,h)--(w,h) withpen pencircle scaled 2pt withcolor green;
drawdot (0,0) withpen pencircle scaled 8pt withcolor red;
drawdot (w,h) withpen pencircle scaled 8pt withcolor red;
\stopuseMPgraphic
\defineoverlay
[fullheightbackground]
[\useMPgraphic{fullheightbackground}]
\setupframedtexts
[background=fullheightbackground,
backgroundoffset=0pt,
frame=off]
\starttext
\startframedtext[width=\textwidth,align=left]
\input knuth
\stopframedtext
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2024-07-23 19:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 18:29 [NTG-context] " alan.caruanambom
2024-07-23 18:43 ` [NTG-context] " Otared Kavian
2024-07-23 18:45 ` Wolfgang Schuster
2024-07-23 19:13 ` alan.caruanambom [this message]
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=172176199456.854231.5106918044533716491@cgl.ntg.nl \
--to=alan.caruanambom@gmail.com \
--cc=ntg-context@ntg.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).