public static final class TLspParameterizedLineStyle.Builder<B extends TLspParameterizedLineStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspEffectsHintStyle.Builder, ILspWorldElevationStyle.Builder
ILspWorldElevationStyle.ElevationMode.OBJECT_DEPENDENT
.
Example usages:
To create the default line style: TLspParameterizedLineStyle whiteOnePixelNotDraped = TLspParameterizedLineStyle.newBuilder().build();
To create a 4-pixel wide red line style for shapes that are draped:TLspParameterizedLineStyle redFourPixelsDraped = TLspParameterizedLineStyle.newBuilder().color(constant(Color.red)).lineWidth(4f).elevationMode(ON_TERRAIN).build();
Modifier and Type | Method and Description |
---|---|
B |
all(ALspStyle aLineStyle)
Sets all parameters on the builder based on the given style.
|
TLspParameterizedLineStyle |
build()
Builds the style with the set parameters.
|
B |
color(ILcdExpression<Color> aColorExpression)
Sets the expression that determines the line color to apply.
|
B |
dashPattern(TLspLineStyle.DashPattern aDashPattern)
Sets the dash pattern.
|
B |
effectsHints(ILspEffectsHintStyle.EffectsHint... aEffectsHints)
Specifies the effects hints to be added to the style.
|
B |
elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
Specifies the elevation mode.
|
B |
opacity(ILcdExpression<Float> aOpacity)
Sets the expression that determines the transparency of the line.
|
String |
toString() |
B |
visibility(ILcdExpression<Boolean> aVisibilityExpression)
Sets the expression that determines whether objects should be displayed or not.
|
B |
width(double aLineWidth)
Sets the line width (pixels).
|
B |
zOrder(int aZOrder)
Sets the Z-order of this style.
|
equals, hashCode
public B color(ILcdExpression<Color> aColorExpression)
Color Color.white
corresponds to the default color.
To apply a different color to vertices on the line use TLcdExpressionFactory.AttributeValueProvider.getValue(java.lang.Object, java.lang.Object, int)
aColorExpression
- An expression of type Color
public B opacity(ILcdExpression<Float> aOpacity)
1
corresponds to an fully opaque line.<1
will make the lines transparent.0
or <0
will make the lines completely transparent.>1
has no effect.If not set, lines keep their original opacity determined by the alpha value of it's color.
aOpacity
- An expression of type Floatpublic B visibility(ILcdExpression<Boolean> aVisibilityExpression)
If not set, all objects in view are always displayed.
aVisibilityExpression
- An expression of type Booleanpublic B width(double aLineWidth)
aLineWidth
- the line widththis
public B dashPattern(TLspLineStyle.DashPattern aDashPattern)
aDashPattern
- a dash pattern. Must not be null
this
public B zOrder(int aZOrder)
aZOrder
- the z orderthis
public B elevationMode(ILspWorldElevationStyle.ElevationMode aMode)
ILspWorldElevationStyle.Builder
elevationMode
in interface ILspWorldElevationStyle.Builder
this
public B effectsHints(ILspEffectsHintStyle.EffectsHint... aEffectsHints)
ILspEffectsHintStyle.Builder
effectsHints
in interface ILspEffectsHintStyle.Builder
aEffectsHints
- the effects hints to be added to the stylethis
public B all(ALspStyle aLineStyle)
ALspStyle.Builder
all
in class ALspStyle.Builder<B extends TLspParameterizedLineStyle.Builder<B>>
aLineStyle
- the style to copythis
public TLspParameterizedLineStyle build()
ALspStyle.Builder
build
in class ALspStyle.Builder<B extends TLspParameterizedLineStyle.Builder<B>>