Class Compositor.BoostCompositor
java.lang.Object
uk.ac.starlink.ttools.plot2.paper.Compositor
uk.ac.starlink.ttools.plot2.paper.Compositor.BoostCompositor
- Enclosing class:
Compositor
Compositor with boosted saturation.
This acts like
Compositor.SATURATION except that any pixel with a
non-zero alpha has its alpha value boosted to a given minimum.
The effect is that even very slightly populated pixels can be
visually distinguished from unpopulated pixels, which is not the
case for standard saturation composition.- Since:
- 12 Feb 2013
- Author:
- Mark Taylor
-
Nested Class Summary
Nested classes/interfaces inherited from class Compositor
Compositor.BoostCompositor, Compositor.Buffer -
Field Summary
Fields inherited from class Compositor
SATURATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBuffer(int count) Creates a buffer on which compositing operations can be performed.floatgetBoost()Returns the boost value for this compositor.floatscaleAlpha(float alpha) Adjusts an alpha value in accordance with this compositor's policy.Methods inherited from class Compositor
byteToFloat, floatToByte, srcOverOpaque
-
Constructor Details
-
BoostCompositor
public BoostCompositor(float boost) Constructor. The boost value must be in the range 0..1; zero is equivalent toCompositor.SATURATION.- Parameters:
boost- minimum alpha output for non-empty pixel
-
-
Method Details
-
createBuffer
Description copied from class:CompositorCreates a buffer on which compositing operations can be performed.- Specified by:
createBufferin classCompositor- Parameters:
count- number of pixel elements in buffer- Returns:
- new buffer
-
scaleAlpha
public float scaleAlpha(float alpha) Description copied from class:CompositorAdjusts an alpha value in accordance with this compositor's policy. It takes an alpha value in the range 0-1 and maps it into the range to be used for output from this compositor.- Specified by:
scaleAlphain classCompositor- Parameters:
alpha- input alpha in range 0-1- Returns:
- adjusted alpha, also in range 0-1
-
getBoost
public float getBoost()Returns the boost value for this compositor.- Returns:
- boost value in range 0..1
-