From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: MetaPost background
Date: Tue, 23 Jul 2024 20:43:51 +0200 [thread overview]
Message-ID: <9B677B30-7887-4268-A1AC-F9FE2F2CC564@gmail.com> (raw)
In-Reply-To: <172175937201.854231.7124811815305121587@cgl.ntg.nl>
[-- Attachment #1.1: Type: text/plain, Size: 2032 bytes --]
Hi,
If you change
drawdot (0,0) withpen pencircle scaled 8pt withcolor red;
into
drawdot (6pt,6pt) withpen pencircle scaled 8pt withcolor red ;
you get what you want (at least for the red dot on the lower left corner).
Here 6pt = 2pt (with of the pen used for the frame) + 4pt (half the diameter of the pen used for the dot).
Best regards: Otared
> On 23 Jul 2024, at 20:29, alan.caruanambom@gmail.com wrote:
>
> Hello, I need the background (lines and points) to be inside (tangent) of the frame, I don't know how to do it
>
> \startuseMPgraphic{fullheightbackground}
> fill unitsquare xyscaled (OverlayWidth, OverlayHeight) withcolor "gray" ;
>
> w := MakeupWidth;
> h := OverlayHeight;
>
> draw (0,0)--(MakeupWidth,0) withpen pencircle scaled 2pt withcolor green;
> draw (0,OverlayHeight)--(MakeupWidth,OverlayHeight) withpen pencircle scaled 2pt withcolor green;
>
> drawdot (0,0) withpen pencircle scaled 8pt withcolor red;
> drawdot (MakeupWidth,OverlayHeight) withpen pencircle scaled 8pt withcolor red;
> \stopuseMPgraphic
>
> \defineoverlay
> [fullheightbackground]
> [\useMPgraphic{fullheightbackground}]
>
> \setupframedtexts
> [background=fullheightbackground,
> backgroundoffset=0pt,
> frame=on]
>
> \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
> ___________________________________________________________________________________
Otared Kavian
e-mail: otared@gmail.com
Phone: +33 6 88 26 70 95
[-- Attachment #1.2: Type: text/html, Size: 4277 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2024-07-23 18:48 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 ` Otared Kavian [this message]
2024-07-23 18:45 ` [NTG-context] " Wolfgang Schuster
2024-07-23 19:13 ` alan.caruanambom
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=9B677B30-7887-4268-A1AC-F9FE2F2CC564@gmail.com \
--to=otared@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).