From: "Eckhart Guthöhrlein" <eckhart.guthoehrlein@uni-bielefeld.de>
Subject: Shading transparency / missing linear_shade variant
Date: Fri, 23 Jul 2004 14:07:13 +0200 [thread overview]
Message-ID: <20040723120713.GF4547@cebitec.uni-bielefeld.de> (raw)
Hi all,
experimenting with transparencies, I have obviously come to a
limitation: color shading does not work for transparent colors. What I
have in mind is a bar filled with a color gradient, starting from a
certain (non-transparent) color and ending transparent, i.e. vanishing
into the background. However, the transparent color appears just black.
Furthermore, the shading variants for linear_shade do not correspond
with those listed in the metafun manual, page 180. Variant 2 is missing
and behaves like variant 3 should.
Example:
\setupcolors[state=start]
\setupbackgrounds[page][background=color,backgroundcolor=red]
\startMPenvironment[global]
\definecolor[HeadLineColor][r=0,g=0,b=1]
\definecolor[Transparent][r=1,g=1,b=1,t=0,a=normal]
\stopMPenvironment
\startreusableMPgraphic{test}
numeric u; u=3cm;
path p;
p := unitsquare xscaled u yscaled u cornered (u/10);
for i=0 upto 3 :
linear_shade(p shifted(i*u,0),i,\MPcolor{HeadLineColor},\MPcolor{Transparent});
endfor;
\stopreusableMPgraphic
\starttext
\reuseMPgraphic{test}
\stoptext
--
Eckhart
next reply other threads:[~2004-07-23 12:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-23 12:07 Eckhart Guthöhrlein [this message]
2004-07-24 9:36 ` Vit Zyka
2004-07-27 11:18 ` Eckhart Guthöhrlein
2004-07-27 11:37 ` Hans Hagen
2004-07-27 11:45 ` Eckhart Guthöhrlein
2004-07-27 12:14 ` 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=20040723120713.GF4547@cebitec.uni-bielefeld.de \
--to=eckhart.guthoehrlein@uni-bielefeld.de \
--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).