Package com.luciad.view.lightspeed.style
Class TLspRasterStyle
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspRasterStyle
- All Implemented Interfaces:
ILspEffectsHintStyle
,ILspWorldElevationStyle
,ILspStyler
public class TLspRasterStyle
extends ALspStyle
implements ILspWorldElevationStyle, ILspEffectsHintStyle
Style for rasters. Construction of a raster style is done through the
Builder
design pattern mechanism.- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
TLspRasterStyle.Builder<B extends TLspRasterStyle.Builder<B>>
Builder for raster styles.Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspEffectsHintStyle
ILspEffectsHintStyle.EffectsHint
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspWorldElevationStyle
ILspWorldElevationStyle.ElevationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
TLspRasterStyle
(TLspRasterStyle.Builder aBuilder) Creates a new style with the properties that are set on the builder -
Method Summary
Modifier and TypeMethodDescriptionCreates a new builder initialized with all the properties of this style.boolean
float
Gets the brightness.Returns the color map.Gets the color model.float
Gets the contrast.Returns the effects hints specified for this style.Returns the elevation mode of this style.Returns the interpolation type of this style.double
Returns the lowest pixel density (number of raster pixels per screen pixel) at which a raster level is used.Gets the color that is modulated with the raster.double
Returns the highest pixel density (number of raster pixels per screen pixel) at which the data will be used.int
hashCode()
boolean
Determines whether this style is transparent.static TLspRasterStyle.Builder
<?> Creates a new builder with the default values.toString()
Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
-
Constructor Details
-
TLspRasterStyle
Creates a new style with the properties that are set on the builder- Parameters:
aBuilder
- a builder which will be used to initialize this style.
-
-
Method Details
-
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 style. -
getModulationColor
Gets the color that is modulated with the raster. For example using a raster with gray-scale colors and a red modulation color will result in a resulting painted raster with red hues.- Returns:
- the modulation color
-
isTransparent
public boolean isTransparent()Description copied from class:ALspStyle
Determines whether this style is transparent. Shapes that are transparent can be painted in a different paint phase than shapes that are not transparent.- Specified by:
isTransparent
in classALspStyle
- Returns:
- whether or not this style is transparent
-
getBrightness
public float getBrightness()Gets the brightness. The brightness is a value in[0, 2]
. A value of 1 (the default) leaves the brightness unchanged. Values larger than 1 makes the colors brighter, while a value smaller than 1 makes the colors less bright.Note that the same effect can be achieved using
TLspLayerStyle
.- Returns:
- the brightness
-
getContrast
public float getContrast()Gets the contrast. The contrast is a value in[0, 2]
. A value of 1 (the default) leaves the contrast unchanged. A value larger than 1 enhances the contrast of dark colors by making them brighter, while a value smaller than 1 enhances the contrast of bright colors by making them darker.Note that the same effect can be achieved using
TLspLayerStyle
.- Returns:
- the contrast
-
getStartResolutionFactor
public double getStartResolutionFactor()Returns the highest pixel density (number of raster pixels per screen pixel) at which the data will be used.- Returns:
- the start resolution factor
- See Also:
-
getLevelSwitchFactor
public double getLevelSwitchFactor()Returns the lowest pixel density (number of raster pixels per screen pixel) at which a raster level is used. Note that this factor does not influence when the least detailed level is used, this is controlled using the start resolution factor.- Returns:
- the start resolution factor
- See Also:
-
getColorModel
Gets the color model. When both a color model and a color map are set, the color map has precedence over the color model. If the color model isnull
then the default color model of the raster should be used. This color model should never be modified. To change the color model you should create a new style with a different color model instance.- Returns:
- the color model. Can be
null
.
-
getColorMap
Returns the color map. The color map is applied to the image after filtering. When both a color model and a color map are set, the color map has precedence over the color model. This color map should never be modified. To change the color map you should create a new style with a different color map instance.- Returns:
- the color map. Can be
null
.
-
getElevationMode
Returns the elevation mode of this style.- Specified by:
getElevationMode
in interfaceILspWorldElevationStyle
- Returns:
- The elevation mode.
-
getInterpolationType
Returns the interpolation type of this style. Anull
interpolation type indicates the default (implementation specific) value should be used.- Returns:
- the interpolation type
-
getEffectsHints
Description copied from interface:ILspEffectsHintStyle
Returns the effects hints specified for this style.- Specified by:
getEffectsHints
in interfaceILspEffectsHintStyle
- Returns:
- the effects hints specified for this style
-
equals
-
hashCode
public int hashCode() -
toString
-