uk.ac.starlink.ttools.plot2.paper
Class Compositor.BoostCompositor

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.paper.Compositor
      extended by uk.ac.starlink.ttools.plot2.paper.Compositor.BoostCompositor
Enclosing class:
Compositor

public static class Compositor.BoostCompositor
extends 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class uk.ac.starlink.ttools.plot2.paper.Compositor
Compositor.BoostCompositor, Compositor.Buffer
 
Field Summary
 
Fields inherited from class uk.ac.starlink.ttools.plot2.paper.Compositor
SATURATION
 
Constructor Summary
Compositor.BoostCompositor(float boost)
          Constructor.
 
Method Summary
 Compositor.Buffer createBuffer(int count)
          Creates a buffer on which compositing operations can be performed.
 float getBoost()
          Returns the boost value for this compositor.
 float scaleAlpha(float alpha)
          Adjusts an alpha value in accordance with this compositor's policy.
 
Methods inherited from class uk.ac.starlink.ttools.plot2.paper.Compositor
byteToFloat, floatToByte, srcOverOpaque
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Compositor.BoostCompositor

public Compositor.BoostCompositor(float boost)
Constructor. The boost value must be in the range 0..1; zero is equivalent to Compositor.SATURATION.

Parameters:
boost - minimum alpha output for non-empty pixel
Method Detail

createBuffer

public Compositor.Buffer createBuffer(int count)
Description copied from class: Compositor
Creates a buffer on which compositing operations can be performed.

Specified by:
createBuffer in class Compositor
Parameters:
count - number of pixel elements in buffer
Returns:
new buffer

scaleAlpha

public float scaleAlpha(float alpha)
Description copied from class: Compositor
Adjusts 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:
scaleAlpha in class Compositor
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


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.