W3C home > Mailing lists > Public > www-svg@w3.org > December 2000

Re: alpha transparency

From: Dean Jackson <dean@w3.org>
Date: Tue, 05 Dec 2000 14:49:14 +0100
Message-ID: <3A2CF25A.9040602@w3.org>
To: Stephane Conversy <conversy@emn.fr>
CC: www-svg@w3.org
Stephane Conversy wrote:


> What happens when 'opacity', 'fill-opacity' and 'stroke-opacity'
> are all set for a particular simple shape ?
> 
> are they composed ?

The 'fill-opacity' property describes the opacity that
is used by the 'fill' property when painting the interior
of a shape.

Similarly, the 'stroke-opacity' property describes the
opacity used by the 'stroke' property when painting the
stroke of a shape.

Object opacity (the 'opacity' property) applies to the
rendering of the entire object.

So if you have something like this:

"fill-opacity: 0.5; fill: green; stroke-opacity: 0.5;
  stroke: red; opacity: 0.5"

you will have a shape that is filled with 50% opaque green
and stroked with 50% opaque red and then composited into
the canvas with 50% opacity.
With object opacity like this, you will end up with 25% opaque
fill and stroke, but it's probably better to remember that
the 'opacity' property applies when compositing the object
(or objects) onto the canvas. So, objects like markers will
be affected by 'opacity' but not by 'fill-opacity' or
'stroke-opacity'.

dean
Received on Tuesday, 5 December 2000 08:45:27 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:19 GMT