Package com.luciad.view.lightspeed.style
Class TLspIconStyle
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspIconStyle
- All Implemented Interfaces:
ILspEffectsHintStyle
,ILspWorldElevationStyle
,ILspStyler
public class TLspIconStyle
extends ALspStyle
implements ILspWorldElevationStyle, ILspEffectsHintStyle
Style used to style a point as a flat icon (also known as a point sprite).
Construction of an icon style is done through the
Builder
design
pattern mechanism.
To style objects based its properties use TLspParameterizedIconStyle
- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
TLspIconStyle.Builder<B extends TLspIconStyle.Builder<B>>
Builder for icon styles.static enum
The different scaling modes for icons.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
TLspIconStyle
(TLspIconStyle.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
Returns the effects hints specified for this style.Returns the elevation mode of this style.getIcon()
Gets the icon.int
Returns the minimum icon size in pixels.Gets the color that is modulated with the icon.double
Gets the icon view offset in X direction.double
Gets the icon view offset in Y direction.double
getScale()
Returns the factor by which the icon width and height are scaled.Returns the scaling mode of this style.double
Returns the icon size in meters.int
hashCode()
boolean
Determines whether this style is transparent.static TLspIconStyle.Builder
<?> Creates a new builder with the default values.toString()
boolean
Returns whether the icon respects its orientationMethods inherited from class com.luciad.view.lightspeed.style.ALspStyle
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
-
Constructor Details
-
TLspIconStyle
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. -
getIcon
Gets the icon. This icon should never be modified. To change the icon you should create a new style with a different icon instance.- Returns:
- the icon
-
getScale
public double getScale()Returns the factor by which the icon width and height are scaled. This scaling is applied in view coordinates, which makes it independent of the map scale. By default, icons are shown in their native size. This scaling only affects the icon if the scaling mode is set toVIEW_SCALING
orWORLD_SCALING_CLAMPED
.- Returns:
- the factor by which the icons are scaled
- See Also:
-
getModulationColor
Gets the color that is modulated with the icon. For example using an icon with gray-scale colors and a red modulation color will result in a resulting painted icon 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
-
getOffsetX
public double getOffsetX()Gets the icon view offset in X direction.- Returns:
- the icon view offset in X direction
-
getOffsetY
public double getOffsetY()Gets the icon view offset in Y direction.- Returns:
- the icon view offset in Y direction
-
usesOrientation
public boolean usesOrientation()Returns whether the icon respects its orientation- Returns:
- true if the icon respects its orientation, false otherwise
-
getScalingMode
Returns the scaling mode of this style.- Returns:
- an icon scaling mode.
-
getWorldSize
public double getWorldSize()Returns the icon size in meters. This size only affects the style if the scaling mode is set toScalingMode.WORLD_SCALING
orScalingMode.WORLD_SCALING_CLAMPED
. The world size is applied to the width of the icon. I.e. when the icon is not square, the width will correspond to this world size, but the height will not. By default this is set to 50000m.- Returns:
- A positive number expressing the icon size in meters.
-
getMinimumPixelSize
public int getMinimumPixelSize()Returns the minimum icon size in pixels. This size only affects the style if the scaling mode is set toScalingMode.WORLD_SCALING_CLAMPED
orScalingMode.WORLD_SCALING
. As soon as the largest dimension (i.e. width or height) of the icon is smaller than this minimum pixel size, the icon will be scaled to satisfy this minimum size. By default this value is set to 0, which indicates that no minimum size will be enforced.- Returns:
- A positive number expressing the minimum icon size in pixels.
-
getElevationMode
Description copied from interface:ILspWorldElevationStyle
Returns the elevation mode of this style.- Specified by:
getElevationMode
in interfaceILspWorldElevationStyle
- Returns:
- The elevation mode.
-
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
-