[metapost] metafun: transparency (opacity) that doesn't add up

Mojca Miklavec mojca.miklavec.lists at gmail.com
Thu Apr 27 01:04:46 CEST 2006


On 4/26/06, Stephan Hennig wrote:
> Mojca Miklavec schrieb:
> > On 4/25/06, Stephan Hennig wrote:
> >>
> >> Is there any way to draw a uniformly colored transparent grid with
> >> MetaFun?
> >
> > Draw a single closed curve instead:
> >
> > For two separate curves you'll always get colors adding up to opacity.
>
> Thanks! This perfectly solves the issue. Could you please give me a
> pointer to some document describing that fact?

I don't know any other references except "common-sense". If you draw
two lines one over another, the color will sum up in the intersection.

If you draw only one "object" (the cross in your case), then the whole
object will be draw with the same color.

It's pretty similar to the fact that
   draw (0,0)--(100,0); draw (0,0)--(0,100);
will come out differently as
   draw (0,100)--(0,0)--(100,0);
This time you can notice the effect even with opaque colors if you're
using mitered linejoins & butt linecaps.


Mojca


More information about the metapost mailing list