public final class TLspLayerStyle extends Object
TLspLayerStyle
is used to style a layer as a whole contrary to ALspStyle
that styles domain objects. Layer styles modify the layer pixels while ALspStyle
determine
how domain objects are painted.
TLspLayerStyle
can do the following post-processing effects on a layer :
TLcdColorLookupTable
.
If a instance of TLspLayerStyle
has a TLcdColorLookupTable
, the color mapping is performed
before other effects like the opacity adjustment. The other effects are commutative and they are applied together.
Layer style is a post-processing effects that is applied for every TLspPaintPhase
for every layer. Its performance impacts increases when used in 3D and with stereo devices.
TLspLayerStyle
can be set to and retrieved from a layer with the methods ILspLayer.setLayerStyle(TLspLayerStyle)
and ILspLayer.getLayerStyle()
.
Modifier and Type | Class and Description |
---|---|
static class |
TLspLayerStyle.Builder
Builder for
TLspLayerStyle . |
Modifier and Type | Method and Description |
---|---|
TLspLayerStyle.Builder |
asBuilder()
Creates a new builder initialized with all the properties of this layer style.
|
boolean |
equals(Object obj) |
float |
getBrightness()
Get the brightness value in the interval [0, 2].
|
TLcdColorLookupTable |
getColorLookupTable()
Gets the color lookup table or
null if the style doesn't have one. |
float[] |
getColorMatrix()
Gets the 4x5 color matrix or
null if the style doesn't have one. |
float |
getContrast()
Get the contrast value in the interval [0, 2].
|
Color |
getModulationColor()
Get the modulation color.
|
float |
getOpacity()
Get the opacity value in the interval [0, 1] (0 means fully transparent, 1 means fully opaque).
|
int |
hashCode() |
static TLspLayerStyle.Builder |
newBuilder()
Creates a new builder with the default values.
|
String |
toString() |
public float getOpacity()
public Color getModulationColor()
getOpacity()
.public float getBrightness()
public float getContrast()
public float[] getColorMatrix()
null
if the style doesn't have one.
The matrix is specified in row major order and is used to transform
the RGBA color of every pixel.TLspLayerStyle.Builder.colorMatrix(float[])
public TLcdColorLookupTable getColorLookupTable()
null
if the style doesn't have one. The color look up table
is used to map a color to another.TLspLayerStyle.Builder.colorLookupTable(TLcdColorLookupTable)
public static TLspLayerStyle.Builder newBuilder()
public TLspLayerStyle.Builder asBuilder()