Class TLspWorldSizedLineStyle

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspWorldSizedLineStyle
All Implemented Interfaces:
ILspWorldElevationStyle, ILspStyler

public class TLspWorldSizedLineStyle extends ALspStyle implements ILspWorldElevationStyle
Style that defines a shape's outline as a line with a width in meters.

Construction of world sized line style is done through the Builder design pattern mechanism.

Since:
2012.0
  • Constructor Details

    • TLspWorldSizedLineStyle

      protected TLspWorldSizedLineStyle(TLspWorldSizedLineStyle.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 TLspWorldSizedLineStyle.Builder<?> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
    • asBuilder

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

      public Color getColor()
      Gets the color.
      Returns:
      the 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
    • getWidth

      public double getWidth()
      Gets the line width (meters). The returned value is always strictly positive.
      Returns:
      the line width
    • getTexture

      public BufferedImage getTexture()
      Returns the image to be used as a texture map.

      The texture is used as a vertical profile with which to paint world-sized lines. For example the following code creates a green world-sized line with a red border on the right and a yellow border on the left when traversing the line in order:

                   BufferedImage image = new BufferedImage( 128,128, BufferedImage.TYPE_INT_ARGB );
                   Graphics g = image.getGraphics();
                   g.setColor( Color.GREEN );
                   g.fillRect( 0,0,128,128 );
                   g.setColor( Color.YELLOW );
                   g.fillRect( 0,0,128,20 );
                   g.setColor( Color.RED );
                   g.fillRect( 0,108,128,20 );
                   TLspWorldSizedLineStyle style = TLspWorldSizedLineStyle.newBuilder().texture( image).width( 30000 ).build();
       
      Horizontally the texture is scaled to fit once in every line segment.
      Returns:
      the image to be used as a texture map
    • 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.
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class ALspStyle
    • toString

      public String toString()
      Overrides:
      toString in class Object