Class TLspLayerStyle
java.lang.Object
com.luciad.view.lightspeed.layer.style.TLspLayerStyle
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 :
- Modify the opacity of the complete layer.
- Adjust the brightness and the contrast of each layer pixel.
- Modify the RGBA components of each layer pixel through a matrix operation, for example transform the color into grey-scale.
- Map each color to a new one with a
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()
.
- Since:
- 2017.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new builder initialized with all the properties of this layer style.boolean
float
Get the brightness value in the interval [0, 2].Gets the color lookup table ornull
if the style doesn't have one.float[]
Gets the 4x5 color matrix ornull
if the style doesn't have one.float
Get the contrast value in the interval [0, 2].Get the modulation color.float
Get the opacity value in the interval [0, 1] (0 means fully transparent, 1 means fully opaque).int
hashCode()
static TLspLayerStyle.Builder
Creates a new builder with the default values.toString()
-
Method Details
-
getOpacity
public float getOpacity()Get the opacity value in the interval [0, 1] (0 means fully transparent, 1 means fully opaque).- Returns:
- the opacity
-
getModulationColor
Get the modulation color. The alpha channel of the modulation color is the same as the value fromgetOpacity()
.- Returns:
- the modulation color.
-
getBrightness
public float getBrightness()Get the brightness value in the interval [0, 2]. A value of 1 (the default) leaves the brightness unchanged. A value larger than 1 makes the colors brighter, while a value smaller than 1 makes the colors darker.- Returns:
- the brightness
-
getContrast
public float getContrast()Get the contrast value in the interval [0, 2]. A value of 1 (the default) leaves the contrast unchanged. A value larger than 1 enhances the contrast of bright colors by making them brighter and dark colors darker.- Returns:
- the contrast
-
getColorMatrix
public float[] getColorMatrix()Gets the 4x5 color matrix ornull
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.- Returns:
- the color matrix
- See Also:
-
getColorLookupTable
Gets the color lookup table ornull
if the style doesn't have one. The color look up table is used to map a color to another.- Returns:
- the color lookup table
- See Also:
-
newBuilder
Creates a new builder with the default values.- Returns:
- the new builder.
-
asBuilder
Creates a new builder initialized with all the properties of this layer style.- Returns:
- the new builder.
-
equals
-
hashCode
public int hashCode() -
toString
-