* Mysterious clipping for shaded MetaFun page background
@ 2007-08-20 19:02 Oliver Buerschaper
2007-08-20 20:23 ` Peter Rolf
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Buerschaper @ 2007-08-20 19:02 UTC (permalink / raw)
To: mailing ConTeXt users list for
Dear folks,
can anyone reproduce this? (Live ConTeXt on the garden seems to run
into this \faststartcolor thing ... with pdfTeX.)
Uncomment the page background overlay and the top bit of the frames'
titles will be chipped off ... doesn't happen for the plain vanilla
color background on my machine.
---
\enableregime[utf]
\setupcolors[state=start]
\usetypescript[palatino][\defaultencoding]
\setupbodyfont[palatino,30pt]
\startMPenvironment
\usetypescript[palatino][\defaultencoding]
\switchtobodyfont[palatino,30pt]
\stopMPenvironment
\startuseMPgraphic{FunnyFrame}
picture pic;
path a,b;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight);
pic := textext(\MPstring{FunnyFrame});
setbounds pic to (boundingbox pic) enlarged (BodyFontSize/5);
pic := pic shifted (OverlayWidth/2,OverlayHeight+(ypart ulcorner
pic)/2);
drawoptions(withpen pencircle scaled OverlayLineWidth withcolor
OverlayLineColor);
b := a topenlarged (ypart center pic-OverlayHeight);
b := b smoothed BodyFontSize;
fill b withcolor white;
draw b;
b := (boundingbox pic) smoothed (BodyFontSize/2);
fill b withcolor yellow;
draw b;
draw pic withcolor black;
setbounds currentpicture to a;
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
[FunnyText]
[background=FunnyFrame,
frame=off,
rulethickness=3pt,
width=\textwidth]
\def\startFrame#1{%
\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}%
\startFunnyText}
\def\stopFrame{\stopFunnyText}
\startuniqueMPgraphic{shade}
path p;
p := unitsquare xyscaled (OverlayWidth,OverlayHeight);
linear_shade(p,6,blue,white);
\stopuniqueMPgraphic
\defineoverlay[shade][\useMPgraphic{shade}]
%\setupbackgrounds
% [page]
% [background=shade]
%\setupbackgrounds
% [page]
% [background=color,
% backgroundcolor=blue]
\noheaderandfooterlines
\starttext
\showframe
\startFrame{Test 1}
The quick brown fox jumps over the lazy dog.
\stopFrame
\startFrame{Test 2}
The quick brown fox jumps over the lazy dog.
\stopFrame
\stoptext
---
Cheerio,
Oliver
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Mysterious clipping for shaded MetaFun page background
2007-08-20 19:02 Mysterious clipping for shaded MetaFun page background Oliver Buerschaper
@ 2007-08-20 20:23 ` Peter Rolf
2007-08-20 20:28 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Peter Rolf @ 2007-08-20 20:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
Oliver Buerschaper schrieb:
> Dear folks,
>
> can anyone reproduce this? (Live ConTeXt on the garden seems to run
> into this \faststartcolor thing ... with pdfTeX.)
>
> Uncomment the page background overlay and the top bit of the frames'
> titles will be chipped off ... doesn't happen for the plain vanilla
> color background on my machine.
>
> ---
>
> \enableregime[utf]
>
> \setupcolors[state=start]
>
<del>
> \usetypescript[palatino][\defaultencoding]
> \setupbodyfont[palatino,30pt]
</del>
>
> \startMPenvironment
[global]
> \usetypescript[palatino][\defaultencoding]
> \switchtobodyfont[palatino,30pt]
> \stopMPenvironment
>
> \startuseMPgraphic{FunnyFrame}
> picture pic;
> path a,b;
> a := unitsquare xyscaled (OverlayWidth,OverlayHeight);
% = OverlayBox
> pic := textext(\MPstring{FunnyFrame});
> setbounds pic to (boundingbox pic) enlarged (BodyFontSize/5);
> pic := pic shifted (OverlayWidth/2,OverlayHeight+(ypart ulcorner
> pic)/2);
> drawoptions(withpen pencircle scaled OverlayLineWidth withcolor
> OverlayLineColor);
> b := a topenlarged (ypart center pic-OverlayHeight);
> b := b smoothed BodyFontSize;
> fill b withcolor white;
> draw b;
% there is filldraw
> b := (boundingbox pic) smoothed (BodyFontSize/2);
> fill b withcolor yellow;
> draw b;
> draw pic withcolor black;
> setbounds currentpicture to a;
draw boundingbox currentpicture withcolor red;
> \stopuseMPgraphic
>
the boundingbox sets the final size of the gfx. if your gfx is larger
than the bb, things will overlap. just enlarge the bb, so that it fits
the gfx.
Peter
> \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
> \defineframedtext
> [FunnyText]
> [background=FunnyFrame,
> frame=off,
> rulethickness=3pt,
> width=\textwidth]
>
> \def\startFrame#1{%
> \setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}%
> \startFunnyText}
> \def\stopFrame{\stopFunnyText}
>
> \startuniqueMPgraphic{shade}
> path p;
> p := unitsquare xyscaled (OverlayWidth,OverlayHeight);
> linear_shade(p,6,blue,white);
> \stopuniqueMPgraphic
> \defineoverlay[shade][\useMPgraphic{shade}]
>
> %\setupbackgrounds
> % [page]
> % [background=shade]
>
> %\setupbackgrounds
> % [page]
> % [background=color,
> % backgroundcolor=blue]
>
> \noheaderandfooterlines
>
>
> \starttext
>
> \showframe
>
> \startFrame{Test 1}
> The quick brown fox jumps over the lazy dog.
> \stopFrame
>
> \startFrame{Test 2}
> The quick brown fox jumps over the lazy dog.
> \stopFrame
>
> \stoptext
>
> ---
>
> Cheerio,
> Oliver
> ___________________________________________________________________________________
> 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 : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Mysterious clipping for shaded MetaFun page background
2007-08-20 20:23 ` Peter Rolf
@ 2007-08-20 20:28 ` Hans Hagen
0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2007-08-20 20:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
Peter Rolf wrote:
> Oliver Buerschaper schrieb:
>> Dear folks,
>>
>> can anyone reproduce this? (Live ConTeXt on the garden seems to run
>> into this \faststartcolor thing ... with pdfTeX.)
it may help to increase
\def\objectoffset{1cm}
(by default reused objects clip and this creates a virtual bbox)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-20 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-20 19:02 Mysterious clipping for shaded MetaFun page background Oliver Buerschaper
2007-08-20 20:23 ` Peter Rolf
2007-08-20 20:28 ` Hans Hagen
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).