Hi, overlays are not displayed when used as a background for textbackground. Is this a bug or are overlays not supported? \defineoverlay [myoverlay] [\ssd Foo] \definetextbackground [mybackgroundColour] [background=color, backgroundcolor=gray] \definetextbackground [mybackgroundOverlay] [background=myoverlay] \starttext %% overlay works \framed [background=myoverlay, align=normal] {\input knuth\par} %% background=color works \startmybackgroundColour \input knuth \stopmybackgroundColour %% overlay is missing \startmybackgroundOverlay \input knuth \stopmybackgroundOverlay \stoptext Marco
Am 14.07.2013 um 20:54 schrieb Marco Patzer
Hi,
overlays are not displayed when used as a background for textbackground. Is this a bug or are overlays not supported?
Overlays are a framed feature (the page background is a frame too) and textbackgrounds are images which are drawn on the page like overlays. Wolfgang
On 2013–07–14 Wolfgang Schuster wrote:
Overlays are a framed feature (the page background is a frame too) and textbackgrounds are images which are drawn on the page like overlays.
MetaPost graphics can be hooked into the textbackground using the mp and method keys. So apparently there is a way to use arbitrary background graphics. It would be a natural consistent interface if overlays worked with the background key. But I assume it's due to the page break ability of textbackground that makes it more complicated to implement. BTW: Is there any documentation, except the source, about the mp and method keys? Marco
On 7/14/2013 8:54 PM, Marco Patzer wrote:
Hi,
overlays are not displayed when used as a background for textbackground. Is this a bug or are overlays not supported?
in principle we can make it pluggable (given that there is some sensible way to pass info and real need for it)
\defineoverlay [myoverlay] [\ssd Foo]
\definetextbackground [mybackgroundColour] [background=color, backgroundcolor=gray] \definetextbackground [mybackgroundOverlay] [background=myoverlay]
\starttext %% overlay works \framed [background=myoverlay, align=normal] {\input knuth\par}
%% background=color works \startmybackgroundColour \input knuth \stopmybackgroundColour
%% overlay is missing \startmybackgroundOverlay \input knuth \stopmybackgroundOverlay \stoptext
\definetextbackground [mybackgroundOverlay] [mp=mpos:region:whatever] \startuseMPgraphic{mpos:region:whatever} for i=1 upto nofmultipars : draw textext("\externalfigure[cow.pdf]") rotated 10 shifted center multipars[i] ; endfor ; \stopuseMPgraphic \starttext \startmybackgroundOverlay \dorecurse{10}{\input knuth \par} \stopmybackgroundOverlay \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On 2013–07–15 Hans Hagen wrote:
On 7/14/2013 8:54 PM, Marco Patzer wrote:
Hi,
overlays are not displayed when used as a background for textbackground. Is this a bug or are overlays not supported?
in principle we can make it pluggable (given that there is some sensible way to pass info and real need for it)
No, I don't need it.
\definetextbackground [mybackgroundOverlay] [mp=mpos:region:whatever]
\startuseMPgraphic{mpos:region:whatever} for i=1 upto nofmultipars : draw textext("\externalfigure[cow.pdf]") rotated 10 shifted center multipars[i] ; endfor ; \stopuseMPgraphic
\starttext
\startmybackgroundOverlay \dorecurse{10}{\input knuth \par} \stopmybackgroundOverlay
\stoptext
Thanks for the example. Marco
This code from three years back ia a reply to a question of placing an overlay background. Because the cow is very black I am curious if the \externalfigure can have a paramter to change the alpha of the cow, making it more transparent. By the way, it is not out of curiosity only. If possible it would forego the need to make separate pictures of different transparency beforehand.
On 15 Jul 2013, at 11:22, Hans Hagen
wrote: \definetextbackground [mybackgroundOverlay] [mp=mpos:region:whatever]
\startuseMPgraphic{mpos:region:whatever} for i=1 upto nofmultipars : draw textext("\externalfigure[cow.pdf]") rotated 10 shifted center multipars[i] ; endfor ; \stopuseMPgraphic
\starttext
\startmybackgroundOverlay \dorecurse{10}{\input knuth \par} \stopmybackgroundOverlay
\stoptext
Hans van der Meer
Here is a trick (due to Hans, of course) to produce a watermark image.
You can play with the idea in order to produce your own effect.
\definecolor [percent] [s=1,a=1,t=.9]
\externalfigure [cow] [background={foreground,color},backgroundcolor=percent]
Alan
On Wed, 18 May 2016 11:55:11 +0000
"Meer, Hans van der"
This code from three years back ia a reply to a question of placing an overlay background. Because the cow is very black I am curious if the \externalfigure can have a paramter to change the alpha of the cow, making it more transparent. By the way, it is not out of curiosity only. If possible it would forego the need to make separate pictures of different transparency beforehand.
On 15 Jul 2013, at 11:22, Hans Hagen
wrote: \definetextbackground [mybackgroundOverlay] [mp=mpos:region:whatever]
\startuseMPgraphic{mpos:region:whatever} for i=1 upto nofmultipars : draw textext("\externalfigure[cow.pdf]") rotated 10 shifted center multipars[i] ; endfor ; \stopuseMPgraphic
\starttext
\startmybackgroundOverlay \dorecurse{10}{\input knuth \par} \stopmybackgroundOverlay
\stoptext
Hans van der Meer
participants (5)
-
Alan BRASLAU
-
Hans Hagen
-
Marco Patzer
-
Meer, Hans van der
-
Wolfgang Schuster