BackgroundGrid constructor

BackgroundGrid(
  1. {Color backgroundColor = const Color(0xFFC0C0C0),
  2. Color lineColor = Colors.black,
  3. double lineWidth = 0.1,
  4. double size = 20}
)

Creates a background grid with the specified properties.

Parameters:

  • backgroundColor — The color of the background.
  • lineColor — The color of the grid lines.
  • lineWidth — The width of the grid lines in device-independent pixels (DIP).
  • size — The size of the grid squares in device-independent pixels (DIP).

Implementation

factory BackgroundGrid(
    {Color backgroundColor = const Color(0xFFC0C0C0),
    Color lineColor = Colors.black,
    double lineWidth = 0.1,
    double size = 20}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreBackgroundColor = backgroundColor.toArcGIS();
  final coreLineColor = lineColor.toArcGIS();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_BackgroundGrid_createWith(
        coreBackgroundColor._handle,
        coreLineColor._handle,
        lineWidth,
        size,
        errorHandler);
  });
  final BackgroundGrid object = BackgroundGrid._withHandle(handle);
  object._backgroundColor.cache(backgroundColor);
  object._lineColor.cache(lineColor);
  return object;
}