|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.paper.Compositor
public abstract class Compositor
Represents an algorithm for combining multiple RGBA values to produce
a single RGBA value. The createBuffer(int)
method produces a buffer
containing a vector of pixels for which the compositing operation
can be performed on each element.
In general RGB values are not pre-multiplied by alpha as used by this class.
RgbImage
Nested Class Summary | |
---|---|
static class |
Compositor.BoostCompositor
Compositor with boosted saturation. |
static interface |
Compositor.Buffer
Buffer of pixels on which compositing operations can be performed. |
Field Summary | |
---|---|
static Compositor |
SATURATION
Implementation which adds colours until the alpha is saturated and then makes no further updates to colour. |
Constructor Summary | |
---|---|
Compositor()
|
Method Summary | |
---|---|
static float |
byteToFloat(int i)
Maps an integer in the range 0-255 to a float in the range 0-1. |
abstract Compositor.Buffer |
createBuffer(int count)
Creates a buffer on which compositing operations can be performed. |
static int |
floatToByte(float f)
Maps a float in the range 0-1 to an int in the range 0-255. |
abstract float |
scaleAlpha(float alpha)
Adjusts an alpha value in accordance with this compositor's policy. |
static int |
srcOverOpaque(int sRgba,
int dRgb)
Returns the result of compositing a possibly transparent source pixel over an opaque destination pixel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Compositor SATURATION
Constructor Detail |
---|
public Compositor()
Method Detail |
---|
public abstract float scaleAlpha(float alpha)
alpha
- input alpha in range 0-1
public abstract Compositor.Buffer createBuffer(int count)
count
- number of pixel elements in buffer
public static float byteToFloat(int i)
i
- integer value
public static int floatToByte(float f)
f
- float in range 0-1
public static int srcOverOpaque(int sRgba, int dRgb)
sRgba
- RGBA for source pixeldRgb
- RGB for opaque destination pixel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |