public static class TLcdComponentColorLookupTable.Builder<B extends TLcdComponentColorLookupTable.Builder<B>> extends Object
2
pixels
wide with 8-bit color components and use linear interpolation. The actual filter must be
specified as either a ColorFilter
or pixel
buffers
.
For example to create a negative filter:
TLcdComponentColorLookupTable table = TLcdComponentColorLookupTable.newBuilder().
filter(
new ILcdColorFilter() {
public void apply( float[] aRGBColorSFCT ) {
aRGBColorSFCT[ 0 ] = 1.f - aRGBColorSFCT[ 0 ];
aRGBColorSFCT[ 1 ] = 1.f - aRGBColorSFCT[ 1 ];
aRGBColorSFCT[ 2 ] = 1.f - aRGBColorSFCT[ 2 ];
}
}
).
build();
Modifier and Type | Method and Description |
---|---|
TLcdComponentColorLookupTable |
build()
Builds the color lookup table.
|
B |
componentType(TLcdLookupTable.ComponentType aComponentType)
Sets the type of the table's color components.
|
B |
filter(Buffer aPixelData)
Sets the each component table's entries directly from a buffer.
|
B |
filter(Buffer aRedPixelData,
Buffer aGreenPixelData,
Buffer aBluePixelData)
Sets the component table's entries directly from a buffer.
|
B |
filter(ILcdColorFilter aColorFilter)
Sets the table's entries from a color filter.
|
B |
interpolation(ELcdInterpolationType aInterpolationType)
Sets the interpolation type between table pixels.
|
B |
size(int aSize)
Sets the size of all table's.
|
B |
size(int aRedSize,
int aGreenSize,
int aBlueSize)
Sets the size of each component's table.
|
public B size(int aSize)
aSize
- the size of the table'spublic B size(int aRedSize, int aGreenSize, int aBlueSize)
aRedSize
- the size for the red color componentaGreenSize
- the size for the green color componentaBlueSize
- the size for the blue color componentpublic B componentType(TLcdLookupTable.ComponentType aComponentType)
aComponentType
- the component typepublic B interpolation(ELcdInterpolationType aInterpolationType)
NONE
and LINEAR
are currently supported.aInterpolationType
- the interpolation typepublic B filter(ILcdColorFilter aColorFilter)
aColorFilter
- the color filterpublic B filter(Buffer aPixelData)
table size
and component type
.
Each table entry has 1 component. See TLcdComponentColorLookupTable
and
TLcdLookupTable
for details.aPixelData
- the pixel bufferpublic B filter(Buffer aRedPixelData, Buffer aGreenPixelData, Buffer aBluePixelData)
table size
and component type
.
Each table entry has 1 component. See TLcdComponentColorLookupTable
and
TLcdLookupTable
for details.aRedPixelData
- the pixel bufferaGreenPixelData
- the pixel bufferaBluePixelData
- the pixel bufferpublic TLcdComponentColorLookupTable build()