Class TLspLineStyle
- All Implemented Interfaces:
ILspEffectsHintStyle
,ILspTexturedStyle
,ILspWorldElevationStyle
,ILspStyler
- Direct Known Subclasses:
TLspPinLineStyle
Builder
design pattern mechanism.
To style objects based its properties use TLspParameterizedLineStyle
- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
An enumeration that defines how lines with the same style will be blended.static class
TLspLineStyle.Builder<B extends TLspLineStyle.Builder<B>>
Builder for line styles.static class
Dash pattern for line 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.ILspTexturedStyle
ILspTexturedStyle.TextureCoordinatesMode
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspWorldElevationStyle
ILspWorldElevationStyle.ElevationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
TLspLineStyle
(TLspLineStyle.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
Determines whether different lines that are painted with the same style and that cover the same pixels are blended together or not.getColor()
Gets the color.Gets the dash pattern.Returns the effects hints specified for this style.Returns the elevation mode of this style.double
Returns the offset from the original geometry at which the line should be drawn.Returns the image to be used as a texture map.Specifies whether the texture coordinates computed to apply the texture map should be relative to the bounds of the object or relative to the world.Specifies whether linear filtering should be used for the texture map.void
getTextureMatrixSFCT
(double[] aMatrixSFCT) Returns a 4x4 matrix that should be applied to the texture coordinates when mapping the texture given by this style.Returns the texture object to be used.double
getWidth()
Gets the line width (pixels).int
hashCode()
boolean
Deprecated.boolean
Specifies whether the texture map should be repeated (tiled) or not.boolean
Determines whether this style is transparent.static TLspLineStyle.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
-
TLspLineStyle
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. -
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 classALspStyle
- Returns:
- whether or not this style is transparent
-
getWidth
public double getWidth()Gets the line width (pixels). The returned value is always strictly positive.- Returns:
- the line width
-
isBlendOverlap
Deprecated.The blend overlap mode is now defined by an enumeration, usegetBlendOverlap()
.Determines whether different lines that are painted with the same style and that cover the same pixels are blended together or not.When
false
, all pixels covered will receive the same color, even if this color is transparent and if multiple lines cover the same pixel. Iftrue
, overlapping (transparent) lines will be blended together resulting in a less transparent color at their crossings.The default value is
false
.- Returns:
- whether or not overlapping lines are blended together
-
getBlendOverlap
Determines whether different lines that are painted with the same style and that cover the same pixels are blended together or not.When the mode is
BlendOverlapMode#NEVER
, all pixels covered will receive the same color, even if this color is transparent and if multiple lines cover the same pixel. If the mode isBlendOverlapMode#ALWAYS
, overlapping (transparent) lines will be blended together resulting in a less transparent color at their crossings.Finally the
BlendOverlapMode#AUTO
chooses the mode that gives the best results depending on the context. For instance, lines that are not draped should be blended. Lines that are draped will not be blended.The default value is
BlendOverlapMode#AUTO
.- Returns:
- a mode defining whether or not overlapping lines are blended together
- Since:
- 2012.1
-
getPixelOffset
public double getPixelOffset()Returns the offset from the original geometry at which the line should be drawn. This offset is specified in pixels. -
getTexture
Description copied from interface:ILspTexturedStyle
Returns the image to be used as a texture map. This image should never be modified. To change the texture you should create a new style with a different image instance.- Specified by:
getTexture
in interfaceILspTexturedStyle
- Returns:
- the image to be used as a texture map
-
getTextureObject
Description copied from interface:ILspTexturedStyle
Returns the texture object to be used.- Specified by:
getTextureObject
in interfaceILspTexturedStyle
- Returns:
- the texture object
-
isRepeatTexture
public boolean isRepeatTexture()Description copied from interface:ILspTexturedStyle
Specifies whether the texture map should be repeated (tiled) or not.- Specified by:
isRepeatTexture
in interfaceILspTexturedStyle
- Returns:
- whether the texture map should be repeated (tiled) or not
-
getTextureInterpolationType
Description copied from interface:ILspTexturedStyle
Specifies whether linear filtering should be used for the texture map.- Specified by:
getTextureInterpolationType
in interfaceILspTexturedStyle
- Returns:
- whether linear texture filtering should be used
-
getTextureCoordinatesMode
Description copied from interface:ILspTexturedStyle
Specifies whether the texture coordinates computed to apply the texture map should be relative to the bounds of the object or relative to the world. In the former case, the map is scaled and offset such that it fills the bounds (in model coordinates) of the object. In the latter case, the model coordinates of the object are used as texture coordinates unmodified.- Specified by:
getTextureCoordinatesMode
in interfaceILspTexturedStyle
- Returns:
- the mode indicating how the texture should be mapped on the object being styled
-
getTextureMatrixSFCT
public void getTextureMatrixSFCT(double[] aMatrixSFCT) Description copied from interface:ILspTexturedStyle
Returns a 4x4 matrix that should be applied to the texture coordinates when mapping the texture given by this style. This can be used to scale, rotate or otherwise transform the texture.- Specified by:
getTextureMatrixSFCT
in interfaceILspTexturedStyle
- Parameters:
aMatrixSFCT
- array containing the elements of a 4x4 matrix in column-major order
-
getDashPattern
Gets the dash pattern. Can benull
.- Returns:
- the dash pattern
-
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
-
getBlendOverlap()
.