Previous Next


                                                 528
CHAPTER 7                                                               Transparency




           TABLE 7.4 Variables used in the source shape and opacity formulas
VARIABLE               MEANING

fs                     Source shape

fj                     Object shape

fm                     Mask shape

fk                     Constant shape

qs                     Source opacity

qj                     Object opacity

qm                     Mask opacity

qk                     Constant opacity


Note: When an object is painted with a tiling pattern, the object shape and object
opacity for points in the object’s interior are determined by those of corresponding
points in the pattern, rather than being 1.0 everywhere (see Section 7.5.6, “Patterns
and Transparency”).


Result Shape and Opacity

In addition to a result color, the painting operation also computes an associated
result shape and result opacity. These computations are based on the union func-
tion
Union ( b, s ) = 1 – [ ( 1 – b ) × ( 1 – s ) ]
               = b + s – (b × s)

where b and s are the backdrop and source values to be composited. This is a gen-
eralization of the conventional concept of union for opaque shapes, and it can be
thought of as an “inverted multiplication”—a multiplication with the inputs and
outputs complemented. The result tends toward 1.0: if either input is 1.0, the re-
sult is 1.0.

Previous Next