ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Overlays as background in textbackground
@ 2013-07-14 18:54 Marco Patzer
  2013-07-14 19:36 ` Wolfgang Schuster
  2013-07-15  9:22 ` Hans Hagen
  0 siblings, 2 replies; 7+ messages in thread
From: Marco Patzer @ 2013-07-14 18:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 625 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Overlays as background in textbackground
  2013-07-14 18:54 Overlays as background in textbackground Marco Patzer
@ 2013-07-14 19:36 ` Wolfgang Schuster
  2013-07-14 21:58   ` Marco Patzer
  2013-07-15  9:22 ` Hans Hagen
  1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2013-07-14 19:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 14.07.2013 um 20:54 schrieb Marco Patzer <homerow@lavabit.com>:

> 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
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Overlays as background in textbackground
  2013-07-14 19:36 ` Wolfgang Schuster
@ 2013-07-14 21:58   ` Marco Patzer
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Patzer @ 2013-07-14 21:58 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 652 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Overlays as background in textbackground
  2013-07-14 18:54 Overlays as background in textbackground Marco Patzer
  2013-07-14 19:36 ` Wolfgang Schuster
@ 2013-07-15  9:22 ` Hans Hagen
  2013-07-15  9:57   ` Marco Patzer
  2016-05-18 11:55   ` Meer, Hans van der
  1 sibling, 2 replies; 7+ messages in thread
From: Hans Hagen @ 2013-07-15  9:22 UTC (permalink / raw)
  To: ntg-context

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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Overlays as background in textbackground
  2013-07-15  9:22 ` Hans Hagen
@ 2013-07-15  9:57   ` Marco Patzer
  2016-05-18 11:55   ` Meer, Hans van der
  1 sibling, 0 replies; 7+ messages in thread
From: Marco Patzer @ 2013-07-15  9:57 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 841 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Overlays as background in textbackground
  2013-07-15  9:22 ` Hans Hagen
  2013-07-15  9:57   ` Marco Patzer
@ 2016-05-18 11:55   ` Meer, Hans van der
  2016-05-18 18:24     ` Alan BRASLAU
  1 sibling, 1 reply; 7+ messages in thread
From: Meer, Hans van der @ 2016-05-18 11:55 UTC (permalink / raw)
  To: NTG ConTeXt

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 <pragma@wxs.nl> 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




___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Overlays as background in textbackground
  2016-05-18 11:55   ` Meer, Hans van der
@ 2016-05-18 18:24     ` Alan BRASLAU
  0 siblings, 0 replies; 7+ messages in thread
From: Alan BRASLAU @ 2016-05-18 18:24 UTC (permalink / raw)
  To: Meer, Hans van der; +Cc: NTG ConTeXt

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" <H.vanderMeer@uva.nl> wrote:

> 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 <pragma@wxs.nl> 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
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-18 18:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-14 18:54 Overlays as background in textbackground Marco Patzer
2013-07-14 19:36 ` Wolfgang Schuster
2013-07-14 21:58   ` Marco Patzer
2013-07-15  9:22 ` Hans Hagen
2013-07-15  9:57   ` Marco Patzer
2016-05-18 11:55   ` Meer, Hans van der
2016-05-18 18:24     ` Alan BRASLAU

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).