Re: [NTG-context] Shading and transparency
On Wed, 11 Jul 2018 23:11:31 +0200 Hans Hagen wrote: > > Is there a method that does not require an external file or > > pre-processing? Using the external file works. Just wondering if > > there's a better - more integrated - way. > i guess that with some experimenting you can come close but the > external file that you use uses masks (actually we do support masks > in external figures) and multiple shades over something in the page > stream For the old implementation (pre 2016-ish) I had a working solution because shading to transparent colours just worked (at least in my case of a simple transparent shade, nothing fancy), but not so any longer. With the new implementation I couldn't get it working. But we discussed that at some point in the past. I believe the gist of it was “shade-to-transparent is gone”. > stuff i'd only look into when i have to (in principle one > can make all kind of fancy mechanisms but does it pay off ... seldom) If there's no easy solution, it's alright. If have a workaround. No need to waste time on exotic features (as long as masks in external figures keep working). Still, if you happen to know a trick to pull that off in ConTeXt, let me know. Marco ___ 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 ___
Re: [NTG-context] Shading and transparency
On 7/11/2018 8:45 PM, Marco Patzer wrote: Hi! It's shadings and transparency again. For most things transparency is not required since the background colour (white) can be used instead, to achieve the same effect (thanks Hans for the reimplementation/cleanup a while ago). For one use case I worked around this by including an external file and overlay the external file (see attached example). Background: In the actual documents the transparent overlays overlay images to have the edges fade into the page background (only the centre is of interest). Is there a method that does not require an external file or pre-processing? Using the external file works. Just wondering if there's a better - more integrated - way. i guess that with some experimenting you can come close but the external file that you use uses masks (actually we do support masks in external figures) and multiple shades over something in the page stream, stuff i'd only look into when i have to (in principle one can make all kind of fancy mechanisms but does it pay off ... seldom) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Shading and transparency
Hi! It's shadings and transparency again. For most things transparency is not required since the background colour (white) can be used instead, to achieve the same effect (thanks Hans for the reimplementation/cleanup a while ago). For one use case I worked around this by including an external file and overlay the external file (see attached example). Background: In the actual documents the transparent overlays overlay images to have the edges fade into the page background (only the centre is of interest). Is there a method that does not require an external file or pre-processing? Using the external file works. Just wondering if there's a better - more integrated - way. Marco \definecolor [transparent] [a=multiply, t=1, s=1] \startuseMPgraphic{trans} fill OverlayBox withshademethod "linear" withshadevector (3, 0) %% (white, "transparent") doesn't work here withshadecolors (white, white) withtransparency (0, .7); \stopuseMPgraphic %% to illustrate the effect, actual background is white \setupbackgrounds [page] [background=color, backgroundcolor=lightgray] \defineoverlay [gradient-mp] [\useMPgraphic{trans}] %% requires external file gradient-t.pdf \defineoverlay [gradient-img] [{\externalfigure[gradient-t][width=\overlaywidth,height=\overlayheight]}] \starttext using external image: \startframedtext [background={foreground, gradient-img}] \input knuth \stopframedtext metapost: \startframedtext [background={foreground, gradient-mp}] \input knuth \stopframedtext \stoptext 5Z7.pdf Description: Adobe PDF document gradient-t.pdf Description: Adobe PDF document ___ 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 ___