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
  • Constructor Details

    • TLspIconStyle

      protected TLspIconStyle(TLspIconStyle.Builder<?> aBuilder)
      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

      public static TLspIconStyle.Builder<?> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
    • asBuilder

      public TLspIconStyle.Builder<?> asBuilder()
      Creates a new builder initialized with all the properties of this style.
      Specified by:
      asBuilder in class ALspStyle
      Returns:
      the new builder.
    • getIcon

      public ILcdIcon 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 to VIEW_SCALING or WORLD_SCALING_CLAMPED.

      Returns:
      the factor by which the icons are scaled
      See Also:
    • getModulationColor

      public Color 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 class ALspStyle
      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

      public TLspIconStyle.ScalingMode 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 to ScalingMode.WORLD_SCALING or ScalingMode.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 to ScalingMode.WORLD_SCALING_CLAMPED or ScalingMode.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

      public ILspWorldElevationStyle.ElevationMode getElevationMode()
      Description copied from interface: ILspWorldElevationStyle
      Returns the elevation mode of this style.
      Specified by:
      getElevationMode in interface ILspWorldElevationStyle
      Returns:
      The elevation mode.
    • getEffectsHints

      public Collection<ILspEffectsHintStyle.EffectsHint> getEffectsHints()
      Description copied from interface: ILspEffectsHintStyle
      Returns the effects hints specified for this style.
      Specified by:
      getEffectsHints in interface ILspEffectsHintStyle
      Returns:
      the effects hints specified for this style
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class ALspStyle
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALspStyle
    • toString

      public String toString()
      Overrides:
      toString in class Object