public final class TLspParameterizedLineStyle extends ALspStyle implements ILspWorldElevationStyle, ILspEffectsHintStyle
ILcdPolyline
. Most properties of this style
can be controlled through expressions
.
Construction of this style is done through its TLspParameterizedLineStyle.Builder
.
The following properties of this style are calculated by an expression:
For defaults, see TLspParameterizedLineStyle.Builder
.
ILcdExpressionIn this example, the even vertices will be assigned a green color, while uneven will be blue. Between vertices the color will be interpolated between green and blue. Note: -When usingcolor = attribute("ColorAttribute", Color.class, new TLcdExpressionFactory.AttributeValueProvider () { @Override public Color getValue(Object aDomainObject, Object aGeometry) { throw new RuntimeException("Not used for lines"); } @Override public Color getValue(Object aDomainObject, Object aGeometry, int aIndex) { return aIndex % 2 == 0 ? Color.green : Color.blue; } }); TLspParameterizedLineStyle style = TLspParameterizedLineStyle.newBuilder() .color(color) .width(5) .build();
TLcdExpressionFactory.viewPositionAttribute()
, the view position is calculated for each vertex
of the line.
- TLcdExpressionFactory.viewPositionAttribute()
must not be used when the elevation mode is set to
ILspWorldElevationStyle.ElevationMode.ON_TERRAIN
or when the elevation mode is ILspWorldElevationStyle.ElevationMode.OBJECT_DEPENDENT
and all
z-values of the geometry are 0.Modifier and Type | Class and Description |
---|---|
static class |
TLspParameterizedLineStyle.Builder<B extends TLspParameterizedLineStyle.Builder<B>>
Builder for parametrized line styles.
|
ILspWorldElevationStyle.ElevationMode
ILspEffectsHintStyle.EffectsHint
Modifier and Type | Method and Description |
---|---|
TLspParameterizedLineStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
boolean |
equals(Object obj) |
ILcdExpression<Color> |
getColor()
Gets the color expression.
|
TLspLineStyle.DashPattern |
getDashPattern()
Gets the dash pattern.
|
Collection<ILspEffectsHintStyle.EffectsHint> |
getEffectsHints()
Returns the effects hints specified for this style.
|
ILspWorldElevationStyle.ElevationMode |
getElevationMode()
Returns the elevation mode of this style.
|
ILcdExpression<Float> |
getOpacity()
Returns the expression that determines transparency of the line.
|
ILcdExpression<Boolean> |
getVisibility()
Returns the expression that determines whether the object should be displayed or not.
|
double |
getWidth()
Gets the line width (pixels).
|
int |
hashCode() |
boolean |
isCompatible(TLspPaintPass aPaintPass)
Utility method to determine whether the style is compatible with the given paint pass.
|
boolean |
isTransparent()
Determines whether this style is transparent.
|
static TLspParameterizedLineStyle.Builder<?> |
newBuilder()
Creates a new builder with the default values.
|
String |
toString() |
addStyleChangeListener, getZOrder, removeStyleChangeListener, style
public static TLspParameterizedLineStyle.Builder<?> newBuilder()
public TLspParameterizedLineStyle.Builder<?> asBuilder()
public ILcdExpression<Color> getColor()
public ILcdExpression<Float> getOpacity()
public ILcdExpression<Boolean> getVisibility()
public boolean isTransparent()
ALspStyle
isTransparent
in class ALspStyle
public double getWidth()
public TLspLineStyle.DashPattern getDashPattern()
public ILspWorldElevationStyle.ElevationMode getElevationMode()
ILspWorldElevationStyle
getElevationMode
in interface ILspWorldElevationStyle
public Collection<ILspEffectsHintStyle.EffectsHint> getEffectsHints()
ILspEffectsHintStyle
getEffectsHints
in interface ILspEffectsHintStyle
public boolean isCompatible(TLspPaintPass aPaintPass)
ALspStyle
isCompatible
in class ALspStyle
aPaintPass
- the paint passtrue
if the style can be used in the given paint pass, false
otherwise
.