SimpleLineSymbol constructor

SimpleLineSymbol(
  1. {SimpleLineSymbolStyle style = SimpleLineSymbolStyle.solid,
  2. Color color = const Color(0xFFD3D3D3),
  3. double width = 1.0,
  4. SimpleLineSymbolMarkerStyle markerStyle = SimpleLineSymbolMarkerStyle.none,
  5. SimpleLineSymbolMarkerPlacement markerPlacement = SimpleLineSymbolMarkerPlacement.end}
)

Creates a simple line symbol object with a style, color, width, and line end marker.

Parameters:

  • style — The type of simple line symbol to create.
  • color — The color of the simple line symbol.
  • width — The width of the simple line symbol.
  • markerStyle — The style of simple line symbol end marker(s).
  • markerPlacement — The placement of simple line symbol end marker(s).

Implementation

factory SimpleLineSymbol(
    {SimpleLineSymbolStyle style = SimpleLineSymbolStyle.solid,
    Color color = const Color(0xFFD3D3D3),
    double width = 1.0,
    SimpleLineSymbolMarkerStyle markerStyle =
        SimpleLineSymbolMarkerStyle.none,
    SimpleLineSymbolMarkerPlacement markerPlacement =
        SimpleLineSymbolMarkerPlacement.end}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreColor = color.toArcGIS();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_SimpleLineSymbol_createWithMarkerStyleAndPlacement(
        style.coreValue,
        coreColor._handle,
        width,
        markerStyle.coreValue,
        markerPlacement.coreValue,
        errorHandler);
  });
  final SimpleLineSymbol object =
      ArcGISSymbol._instanceCache.instanceWith(handle);
  object._color.cache(color);
  return object;
}