class CompressionStreamColor extends CompressionStreamElement
| Modifier and Type | Field and Description |
|---|---|
private int |
A |
(package private) int |
aAbsolute |
private int |
B |
(package private) int |
bAbsolute |
private boolean |
color3 |
private boolean |
color4 |
private float |
colorA |
private float |
colorB |
private float |
colorG |
private float |
colorR |
private int |
G |
(package private) int |
gAbsolute |
private int |
R |
(package private) int |
rAbsolute |
absolute, length, lengthMask, quantizationMask, shift| Constructor and Description |
|---|
CompressionStreamColor(CompressionStream stream,
Color3f c3)
Create a CompressionStreamColor.
|
CompressionStreamColor(CompressionStream stream,
Color4f c4)
Create a CompressionStreamColor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
outputColor(HuffmanTable table,
CommandStream output,
int header,
int headerLength) |
(package private) void |
outputCommand(HuffmanTable table,
CommandStream output)
Output a setColor command.
|
(package private) void |
outputSubcommand(HuffmanTable table,
CommandStream output)
Output a color subcommand.
|
(package private) void |
quantize(CompressionStream stream,
HuffmanTable huffmanTable)
Quantize a floating point color to fixed point integer components of
the specified number of bits.
|
java.lang.String |
toString() |
computeLengthShift, computeLengthShift, computeLengthShiftprivate int R
private int G
private int B
private int A
private boolean color3
private boolean color4
private float colorR
private float colorG
private float colorB
private float colorA
int rAbsolute
int gAbsolute
int bAbsolute
int aAbsolute
CompressionStreamColor(CompressionStream stream, Color3f c3)
stream - CompressionStream associated with this elementcolor3 - floating-point representation to be encodedCompressionStreamColor(CompressionStream stream, Color4f c4)
stream - CompressionStream associated with this elementcolor4 - floating-point representation to be encodedvoid quantize(CompressionStream stream, HuffmanTable huffmanTable)
The bit length is the total number of bits in the signed version of the fixed point representation of the input color, which is assumed to be normalized into the [0..1) range. With the maximum bit length of 16, 15 bits of positive colors can be represented; a bit length of 9 is needed to get the 8 bit positive color size in common use.
quantize in class CompressionStreamElementstream - CompressionStream associated with this elementtable - HuffmanTable for collecting data about the quantized
representation of this elementvoid outputCommand(HuffmanTable table, CommandStream output)
outputCommand in class CompressionStreamElementtable - HuffmanTable mapping quantized representations to
compressed encodingsoutput - CommandStream for collecting compressed outputvoid outputSubcommand(HuffmanTable table, CommandStream output)
table - HuffmanTable mapping quantized representations to
compressed encodingsoutput - CommandStream for collecting compressed outputprivate void outputColor(HuffmanTable table, CommandStream output, int header, int headerLength)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.