ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Keith McKay <mckaymeister@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Fwd: Fwd: Re: Fwd: Re: text width shadow background
Date: Sun, 9 Jul 2023 11:53:57 +0100	[thread overview]
Message-ID: <fd2bfd93-7d0b-2e81-e652-d7be6ef1faab@gmail.com> (raw)
In-Reply-To: <7289fe76-3cd9-44ec-9b7a-1ac677c21981@gmail.com>


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

Reduced size as requested.
Moderator please delete original message which was greater than 100k
Thanks
Keith McKay

-------- Forwarded Message --------
Subject: 	Re: [NTG-context] Re: Fwd: Re: text width shadow background
Date: 	Sat, 8 Jul 2023 14:14:38 +0100
From: 	Keith McKay <mckaymeister@gmail.com>
To: 	mailing list for ConTeXt users <ntg-context@ntg.nl>, Henning Hraban 
Ramm <texml@fiee.net>



I played about with the number of shadow layers and added a wee bit 
randomness which gave a nice effect. See the code below and the attached 
png.

Best Wishes

Keith

%%%%%%%%%%%

\startMPcode
steps := 30 ; % number of shadow layers
rulesize := BodyFontSize/steps/3;
for step = 1 upto steps:
draw lmt_outline [
text = "\bf\strut #1",
kind = "fillup",
fillcolor = "tshade",
rulethickness = (step*rulesize),
]randomized 3;
endfor;
draw lmt_outline [
text = "\bf\strut #1",
kind = "fillup",
fillcolor = "white",
rulethickness = 0,
];% yshifted (BodyFontSize*2/3); % TODO
\stopMPcode


On 08/07/2023 12:07, Henning Hraban Ramm wrote:
> Am 08.07.23 um 11:39 schrieb Hans Hagen via ntg-context:
>> On 7/8/2023 8:55 AM, Henning Hraban Ramm wrote:
>>> Please, can you explain why the result of lmt_outline is shifted to 
>>> the right, if I use it in a macro?
>>
>> no time now but you can do this instead of the lmt_text:
>>
>>      draw lmt_outline [
>>          text = "\bf\strut #1",
>>          kind = "fillup",
>>          fillcolor = "white",
>>          rulethickness = rulesize,
>>      ];
>>
>> (maybe spaces creep in due to loading font files / setups or so)
>
> Thank you!
> Yes, this works, and with rulethickness=0 it even looks like I wanted 
> it to.
>
> Hraban
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist :ntg-context@ntg.nl  /https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  :https://www.pragma-ade.nl  /http://context.aanhet.net
> archive  :https://bitbucket.org/phg/context-mirror/commits/
> wiki     :https://contextgarden.net
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 5891 bytes --]

[-- Attachment #2: shadowEffect.png --]
[-- Type: image/png, Size: 84974 bytes --]

[-- Attachment #3: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

           reply	other threads:[~2023-07-09 10:53 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <7289fe76-3cd9-44ec-9b7a-1ac677c21981@gmail.com>]

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=fd2bfd93-7d0b-2e81-e652-d7be6ef1faab@gmail.com \
    --to=mckaymeister@gmail.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).