public
classTransparencyAttributes
extends NodeComponent
Overview
Inheritance
Members
Usage
Source
Books
SinceNot specified.
VersionNot specified.
Author(s)Not specified.
The TransparencyAttributes object defines all attributes affecting
transparency of the object. The transparency attributes are:
Transparency mode - defines how transparency is applied to
this Appearance component object:
FASTEST - uses the fastest available method for transparency.
NICEST - uses the nicest available method for transparency.
SCREEN_DOOR - uses screen-door transparency. This is done using
an on/off stipple pattern in which the percentage of transparent pixels
is approximately equal to the value specified by the transparency
parameter.
BLENDED - uses alpha blended transparency. The blend equation is
specified by the srcBlendFunction and dstBlendFunction attributes.
The default equation is:
alphasrc*src +
(1-alphasrc)*dst
where alphasrc is
1-transparency.
When this mode is used with a Raster object or with a Geometry
that contains per-vertex colors with alpha, the alpha values in
the Raster's image or in the Geometry's per-vertex colors are
combined with the transparency value in this TransparencyAttributes
object to perform blending. In this case, the alpha value used for
blending at each pixel is:
alphasrc =
alphapix *
(1-transparency).
NONE - no transparency; opaque object.
Transparency value - the amount of transparency to be applied to this
Appearance component object. The transparency values are in the
range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being
fully transparent.
Blend function - used in blended transparency and antialiasing
operations. The source function specifies the factor that is
multiplied by the source color. This value is added to the product
of the destination factor and the destination color. The default
source blend function is BLEND_SRC_ALPHA. The source blend function
is one of the following:
BLEND_ZERO - the blend function is f = 0
BLEND_ONE - the blend function is f = 1
BLEND_SRC_ALPHA - the blend function is f =
alphasrc
BLEND_ONE_MINUS_SRC_ALPHA - the blend function is f =
1 - alphasrc
BLEND_DST_COLOR - the blend function is f =
colordst
BLEND_ONE_MINUS_DST_COLOR - the blend function is f =
1 - colordst
BLEND_SRC_COLOR - the blend function is f =
colorsrc
BLEND_ONE_MINUS_SRC_COLOR - the blend function is f =
1 - colorsrc
wherealphasrc*src + (1-alphasrc)*dstalphasrcis1-transparency. When this mode is used with a Raster object or with a Geometry that contains per-vertex colors with alpha, the alpha values in the Raster's image or in the Geometry's per-vertex colors are combined with the transparency value in this TransparencyAttributes object to perform blending. In this case, the alpha value used for blending at each pixel is:alphasrc = alphapix * (1-transparency).f = 0f = 1f = alphasrcf = 1 - alphasrcf = colordstf = 1 - colordstf = colorsrcf = 1 - colorsrc