[NTG-context] metaobj and transparent colors with \MPcolor

Eckhart Guthöhrlein eckhart.guthoehrlein at uni-bielefeld.de
Fri Jul 23 09:53:22 CEST 2004


Hi,

I try to achieve transparently filled objects using the metaobj package.
However, transparency is ignored completely in the output, I just get a
normal white. Here is my test file:

\setupcolors[state=start]
\setupbackgrounds[page][background=color,backgroundcolor=red]

\startMPenvironment[global]
  \definecolor[Durchsichtig][r=1.0,g=1.0,b=1.0,t=0.0,a=normal]
\stopMPenvironment

\startreusableMPgraphic{test}
	input metaobj;
	setObjectDefaultOption("Box")("fillcolor")(\MPcolor{Durchsichtig});
	newBox.test(btex Transparent? etex) "filled(true)";
	Obj(test).c=origin;
	drawObj(test);
\stopreusableMPgraphic

\starttext
	\reuseMPgraphic{test}
\stoptext


If I use the fillcolor as an argument to the object

	newBox.test(btex Transparent? etex) "filled(true)"
		"fillcolor(\MPcolor{Durchsichtig})";

I get error messages from the mpost run. So it seems that metaobj and
\MPcolor don't like each other.
Any ideas how to circumvent this problem?

Regards,
Eckhart


More information about the ntg-context mailing list