Class SolidStrokeSymbolLayer
- java.lang.Object
-
- com.esri.arcgisruntime.symbology.SymbolLayer
-
- com.esri.arcgisruntime.symbology.StrokeSymbolLayer
-
- com.esri.arcgisruntime.symbology.SolidStrokeSymbolLayer
-
public final class SolidStrokeSymbolLayer extends StrokeSymbolLayer
Represents a polyline geometry symbolized with a solid color.This symbol layer, if it is the sole symbol layer in a MultilayerSymbol, colors the geometry of the line with the specified solid color. The class also allows setting a collection of
GeometricEffect
which modify the stroke in various ways.It is also used to represent the Web Scene specification's LineSymbol3DLayer and PathSymbol3DLayer. LineSymbol3DLayer is represented by
StrokeSymbolLayer.LineStyle3D.STRIP
, and PathSymbol3DLayer is represented byStrokeSymbolLayer.LineStyle3D.TUBE
.The SolidStrokeSymbolLayer provides a similar user experience to the SimpleLineSymbolHandle, but, since it is a symbol layer, can be used in a MultilayerSymbol. The simple line styles of the SimpleLineSymbol are represented here by
DashGeometricEffect
, but all dash patterns are custom.A SolidStrokeSymbolLayer in a MultilayerPolygonSymbol will act as the outline of the fill.
- Since:
- 100.5.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esri.arcgisruntime.symbology.StrokeSymbolLayer
StrokeSymbolLayer.CapStyle, StrokeSymbolLayer.LineStyle3D
-
-
Constructor Summary
Constructors Constructor Description SolidStrokeSymbolLayer()
Creates a solid stroke symbol layer with no parameters.SolidStrokeSymbolLayer(double width, int color, java.lang.Iterable<GeometricEffect> geometricEffects)
Creates a solid stroke symbol layer with the given width, color, and geometric effects.SolidStrokeSymbolLayer(double width, int color, java.lang.Iterable<GeometricEffect> geometricEffects, StrokeSymbolLayer.LineStyle3D lineStyle3D)
Creates a solid stroke symbol layer with the given width, color, geometric effects and 3D line style.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColor()
Gets the color of a solid stroke symbol layer.java.util.List<GeometricEffect>
getGeometricEffects()
Gets a list of the geometric effects.void
setColor(int color)
Sets the color of a solid stroke symbol layer.-
Methods inherited from class com.esri.arcgisruntime.symbology.StrokeSymbolLayer
getCapStyle, getLineStyle3D, getWidth, setCapStyle, setLineStyle3D, setWidth
-
Methods inherited from class com.esri.arcgisruntime.symbology.SymbolLayer
isColorLocked, isEnabled, setColorLocked, setEnabled
-
-
-
-
Constructor Detail
-
SolidStrokeSymbolLayer
public SolidStrokeSymbolLayer()
Creates a solid stroke symbol layer with no parameters. The default line will have the following default properties: width 5.333 dp, color 0xff000000 in the format 0xAARRGGBB,StrokeSymbolLayer.CapStyle.ROUND
,StrokeSymbolLayer.LineStyle3D.STRIP
, and no geometric effects.Note:
width
is defined in dp (density-independent pixels) for all line styles exceptStrokeSymbolLayer.LineStyle3D.TUBE
, which is defined in meters.- Since:
- 100.5.0
-
SolidStrokeSymbolLayer
public SolidStrokeSymbolLayer(double width, int color, java.lang.Iterable<GeometricEffect> geometricEffects)
Creates a solid stroke symbol layer with the given width, color, and geometric effects. The other properties are defaulted as follows: cap style isStrokeSymbolLayer.CapStyle.ROUND
, and the 3D line style isStrokeSymbolLayer.LineStyle3D.STRIP
.- Parameters:
width
- the width of the stroke in dp (density-independent pixels) for all line styles exceptStrokeSymbolLayer.LineStyle3D.TUBE
, which is defined in meters.color
- the color of the stroke in the format 0xAARRGGBBgeometricEffects
- the geometric effects of the stroke- Throws:
java.lang.IllegalArgumentException
- if geometricEffects is null- Since:
- 100.5.0
-
SolidStrokeSymbolLayer
public SolidStrokeSymbolLayer(double width, int color, java.lang.Iterable<GeometricEffect> geometricEffects, StrokeSymbolLayer.LineStyle3D lineStyle3D)
Creates a solid stroke symbol layer with the given width, color, geometric effects and 3D line style. Cap style is defaulted toStrokeSymbolLayer.CapStyle.ROUND
.- Parameters:
width
- the width of the stroke in dp (density-independent pixels) for all line styles exceptStrokeSymbolLayer.LineStyle3D.TUBE
, which is defined in meters.color
- the color of the stroke in the format 0xAARRGGBBgeometricEffects
- the geometric effects of the strokelineStyle3D
- the 3D line style of the stroke- Throws:
java.lang.IllegalArgumentException
- if geometricEffects or lineStyle3D are null- Since:
- 100.5.0
-
-
Method Detail
-
getColor
public int getColor()
Gets the color of a solid stroke symbol layer. The default color is opaque black, 0xff000000.The solid color of the
SolidStrokeSymbolLayer
. The stroke will render with the specified color. When getting the color from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.
- Returns:
- the color of the stroke in the format 0xAARRGGBB
- Since:
- 100.5.0
-
setColor
public void setColor(int color)
Sets the color of a solid stroke symbol layer. The default color is opaque black, 0xff000000.The solid color of the
SolidStrokeSymbolLayer
. The stroke will render with the specified color. When getting the color from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.
- Parameters:
color
- the color of the stroke in the format 0xAARRGGBB- Since:
- 100.5.0
-
getGeometricEffects
public java.util.List<GeometricEffect> getGeometricEffects()
Gets a list of the geometric effects. The list is modifiable and effects can be added or removed.- Returns:
- the collection of geometric effects
- Since:
- 100.5.0
-
-