ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marco Patzer <lists@homerow.info>
To: Hans Hagen <j.hagen@xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Shading and transparency
Date: Thu, 12 Jul 2018 23:53:32 +0200	[thread overview]
Message-ID: <20180712235332.3a7e815a@homerow> (raw)
In-Reply-To: <a70c91f3-2627-47f2-19f9-5aef523e71d6@xs4all.nl>

[-- Attachment #1: Type: text/plain, Size: 2082 bytes --]

On Thu, 12 Jul 2018 22:59:05 +0200
Hans Hagen <j.hagen@xs4all.nl> wrote:

> hm, I'm puzzled as a shade doesn't go between colors + transparent
> but from one color to another (in the same color space) and
> transparency is just a different mechanism
> 
> maybe it was some side effect of chosen values / vectors that gave
> the combined impression (which is why i want to see the pdf made by
> context that you use as reference)

I just checked some older projects and the older versions. I used a
mix between

- linear_shade…
- withshading("linear"…
- withshademethod "linear" …

depending on the age of the project. And I fail to find a project
using transparent shading where the transparency is done in context.
I could not get it working now on the older versions. Maybe you're
right and it has never worked the way I thought it had. Sorry for
the noise.

> \setupbackgrounds [page] [background=color, backgroundcolor=lightgray]
> 
> \starttext
> 
> \startuseMPgraphic{test}
>      graycolor white; white := 1 ;
>      fill OverlayBox
>          withshademethod "linear"
>          withshadedirection shadedup
>          withshadefactor 1.5
>          withshadecolors (.85white,white)
>        % withtransparency (multiplytransparent,.7)
>          withtransparency (normaltransparent,.7)
> \stopuseMPgraphic
> 
> \defineoverlay[test][\useMPgraphic{test}]
> 
> \framed
>    [align=middle,background={foreground,test}]
>    {\samplefile{sapolsky}}
> 
> \stoptext

That's basically shading to the background colour, which gives the
impression of transparency. I've been using that. Works most of the
time. But it's not the same. See the attached file and compare.

I guess I'll keep using the external file overlay then.

> > Just run the first example with an old context version. The file
> > gradient-t from my last mail was created using inkscape as I don't
> > want a single project to depend on two different context versions.  
> you're kidding ... i have no old context on my machine

Silly me :)

Marco

[-- Attachment #2: 0nC.pdf --]
[-- Type: application/pdf, Size: 11557 bytes --]

[-- Attachment #3: 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
___________________________________________________________________________________

      reply	other threads:[~2018-07-12 21:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 18:45 Marco Patzer
2018-07-11 21:11 ` Hans Hagen
2018-07-11 21:40   ` Marco Patzer
2018-07-12  9:21     ` Hans Hagen
2018-07-12 20:08       ` Marco Patzer
2018-07-12 20:59         ` Hans Hagen
2018-07-12 21:53           ` Marco Patzer [this message]

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=20180712235332.3a7e815a@homerow \
    --to=lists@homerow.info \
    --cc=j.hagen@xs4all.nl \
    --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).