public static class TLspWorldSizedLineStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>> extends ALspStyle.Builder<B> implements ILspWorldElevationStyle.Builder
ILspWorldElevationStyle.ElevationMode.ON_TERRAIN
.
Example usage:
To create a 10 meter wide red line style for shapes that are painted on the
terrain:TLspWorldSizedLineStyle redTenMetersOnTerrain = TLspWorldSizedLineStyle.newBuilder().color(Color.red).lineWidth(10f).elevationMode(ElevationMode.ON_TERRAIN).build();
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
B |
all(ALspStyle aColorStyle)
Sets all parameters on the builder based on the given style.
|
TLspWorldSizedLineStyle |
build()
Builds the style with the set parameters.
|
B |
color(Color aColor)
Sets the color.
|
B |
elevationMode(ILspWorldElevationStyle.ElevationMode aElevationMode)
Specifies the elevation mode.
|
B |
opacity(float aOpacity)
Sets the opacity (alpha) value for the color.
|
B |
texture(BufferedImage aTexture)
Sets a texture with which the world sized line should be visualized.
|
String |
toString() |
B |
width(double aLineWidth)
Sets the line width (meters).
|
B |
zOrder(int aZOrder)
Sets the Z-order of this style.
|
equals, hashCode
public B color(Color aColor)
null
.aColor
- the colorthis
IllegalArgumentException
- if aColor==null
public B opacity(float aOpacity)
color(...)
method.
However, this method leaves the RGB values intact and only
modifies the alpha value. Note that, the other way around,
the color(...)
method does override the set alpha value.aOpacity
- the alpha value.
Must be contained in the [0,1] interval (0 is fully transparent, 1 is fully opaque).this
public B elevationMode(ILspWorldElevationStyle.ElevationMode aElevationMode)
ILspWorldElevationStyle.ElevationMode.ON_TERRAIN
.
Currently only 'ON_TERRAIN' and 'ABOVE_ELLIPSOID' are supported for this style.elevationMode
in interface ILspWorldElevationStyle.Builder
aElevationMode
- The elevation modethis
public B zOrder(int aZOrder)
aZOrder
- the z orderthis
public B width(double aLineWidth)
aLineWidth
- the line widththis
public B texture(BufferedImage aTexture)
aTexture
- the texture's imagethis
public B all(ALspStyle aColorStyle)
ALspStyle.Builder
all
in class ALspStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>>
aColorStyle
- the style to copythis
public TLspWorldSizedLineStyle build()
ALspStyle.Builder
build
in class ALspStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>>