Class 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

  • Constructor Details

    • TLspIconStyle

      protected TLspIconStyle(TLspIconStyle.Builder<?> aBuilder)
      Creates a new style with the properties that are set on the builder
      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.
      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
      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.

      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.

      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.
      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
      whether or not this style is transparent
    • getOffsetX

      public double getOffsetX()
      Gets the icon view offset in X direction.
      the icon view offset in X direction
    • getOffsetY

      public double getOffsetY()
      Gets the icon view offset in Y direction.
      the icon view offset in Y direction
    • usesOrientation

      public boolean usesOrientation()
      Returns whether the icon respects its orientation
      true if the icon respects its orientation, false otherwise
    • getScalingMode

      public TLspIconStyle.ScalingMode getScalingMode()
      Returns the scaling mode of this style.
      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.

      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.

      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
      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
      the effects hints specified for this style
    • equals

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

      public int hashCode()
      hashCode in class ALspStyle
    • toString

      public String toString()
      toString in class Object