From: Rik Kabel <context@rik.users.panix.com>
To: ntg-context@ntg.nl
Subject: Re: A better \definesymbol sought
Date: Tue, 24 Jan 2017 14:01:47 -0500 [thread overview]
Message-ID: <c12b5ed8-a387-6864-7302-110901d33958@rik.users.panix.com> (raw)
In-Reply-To: <0fcbcde6-ffe5-c6f0-dfe9-b7c9cf5368dd@wxs.nl>
[-- Attachment #1.1: Type: text/plain, Size: 2244 bytes --]
On 2017-01-24 03:34, Hans Hagen wrote:
> On 1/24/2017 4:04 AM, Rik wrote:
>>
>> What I want is that the background of the page (yellow in this case)
>> should show through. That is what is done with fill / reverse / cycle,
>> as in:
>>
>> \setupbackgrounds
>> [page]
>> [background=color,backgroundcolor=yellow]
>> \startuseMPgraphic{CircleTest}
>> path p,q ;
>> p := fullcircle scaled 2cm ;
>> q := fullcircle scaled 1cm ;
>> fill p -- reverse q -- cycle withcolor blue;
>> \stopuseMPgraphic
>> \starttext
>> \useMPgraphic{CircleTest}
>> \stoptext
>>
>> where the background color (yellow) comes through the inner circle
>> (path q).
>>
>> Can this be done with text characters? I suspect that the answer is that
>> the glyphs have to be converted to paths and that it will only work when
>
> \setupbackgrounds
> [page]
> [background=color,
> backgroundcolor=yellow]
> \starttext
> \startcolor[blue]\starteffect[outer]PQR\stopeffect\stopcolor
> \stoptext
Still not there.
Is there a way to define the ? characters to remove their coloring in
the output of the following so that the background yellow appears
through the outline even within the portions of the ?s placed on the
blue heart? I want to be able to place this over arbitrary text and
color backgrounds (stencil-like) so that the arbitrary text and
background color shows through.
\setupbackgrounds
[page]
[background={color,bgtext},backgroundcolor=yellow]
\definelayer
[bgtext]
[x=1in,
y=2.0in,
state=start]
\setlayerframed
[bgtext]
{\setupbodyfont[36pt]@@@}
\definefont
[DVSrB]
[file:DejaVuSerif-Bold.ttf]
\startbuffer[Outer]
\startcolor[blue]
\starteffect
[outer]
{\DVSrB ???}
\stopeffect
\stopcolor
\stopbuffer
\startuseMPgraphic{HeartTest}
picture h,q ;
h := "♥" infont "\truefontname{DejaVuSerif-Bold.ttf}" scaled 5 ;
q := textext("{\getbuffer[Outer]}") scaled 3 ;
draw h withcolor blue ;
draw q ;
\stopuseMPgraphic
\starttext
\starttext
\useMPgraphic{HeartTest}
\stoptext
--
Rik
[-- Attachment #1.2.1: Type: text/html, Size: 4284 bytes --]
[-- Attachment #1.2.2: fodcdfohbbomiobd.png --]
[-- Type: image/png, Size: 6404 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2017-01-24 19:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-21 3:33 Rik Kabel
2017-01-21 4:54 ` Alan Braslau
2017-01-23 3:39 ` Rik Kabel
2017-01-23 5:06 ` Alan Braslau
2017-01-23 19:09 ` Rik Kabel
2017-01-24 3:04 ` Rik
2017-01-24 8:34 ` Hans Hagen
2017-01-24 19:01 ` Rik Kabel [this message]
2017-01-25 10:17 ` Hans Hagen
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=c12b5ed8-a387-6864-7302-110901d33958@rik.users.panix.com \
--to=context@rik.users.panix.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).