ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: David Arnold <dwarnold45@cox.net>
Subject: setbounds question
Date: Fri, 23 Dec 2005 09:44:07 -0800	[thread overview]
Message-ID: <2E6E9D12-DAB7-42F3-A3A9-D764CECE9BEB@cox.net> (raw)
In-Reply-To: <43ABC345.8050006@wxs.nl>

Ah,

Not a bigger pen, but a bigger background shows the difference.

% output=pdf


\setupcolors[state=start]

\startuniqueMPgraphic{shadow}
    fill OverlayBox shifted (20pt,-20pt) withcolor .8white ;
    fill OverlayBox withcolor white ;
    draw OverlayBox withcolor red ;
    setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic

\defineoverlay[shadow][\uniqueMPgraphic{shadow}]


\startuniqueMPgraphic{shadow2}
    fill OverlayBox shifted (20pt,-20pt) withcolor .8white ;
    fill OverlayBox withcolor white ;
    draw OverlayBox withcolor red ;
%   setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic

\defineoverlay[shadow2][\uniqueMPgraphic{shadow2}]

\starttext

\framed
[align=middle,background=shadow,frame=off]
{\input tufte\relax}

\blank[5*big]

\framed
[align=middle,background=shadow2,frame=off]
{\input tufte\relax}


\stoptext



On Dec 23, 2005, at 1:28 AM, Hans Hagen wrote:

> David Arnold wrote:
>
>> Very cool. First time I ever could figure out what \relax does.  
>> When  I deleted it from this source, I got:
>>
>> ! I can't find file `zapf}'.
>> l.25  {\input zapf}
>>
>> Please type another input file name:
>>
>> Good learning experience for me. I've seen and ignored this type  
>> of  error message before, looking elsewhere in the code. A very  
>> good  heads up for me.
>>
>> Now is there anyway I can visualize the importance of the line
>>
>>    setbounds currentpicture to OverlayBox ;
>>
>> in this example? I deleted it and recompiled but didn't see much   
>> difference. What is the import of this line?
>
> take a bigger pen ... since the background is bigger than the  
> overlaybox it will get centered in the background which si not what  
> you want, therefore the bounding
>
> Hans
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

      reply	other threads:[~2005-12-23 17:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-22  7:21 section prefix=+ David Arnold
2005-12-22  7:25 ` section prefix=+ (oops) David Arnold
2005-12-22 10:31 ` Red framed text Jilani Khaldi
2005-12-22 10:42   ` Taco Hoekwater
2005-12-22 17:07     ` Jilani Khaldi
2005-12-22 21:15       ` Hans Hagen
2005-12-22 22:36         ` Jilani Khaldi
2005-12-23  7:59           ` Jilani Khaldi
2005-12-23  8:25             ` Peter Münster
2005-12-22 23:22         ` David Arnold
2005-12-23  9:28           ` Hans Hagen
2005-12-23 17:44             ` David Arnold [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=2E6E9D12-DAB7-42F3-A3A9-D764CECE9BEB@cox.net \
    --to=dwarnold45@cox.net \
    --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).