strokeSrcMixinScale method

void strokeSrcMixinScale(
  1. StrokeSrcMixin base,
  2. int zoomlevel
)
inherited

Implementation

void strokeSrcMixinScale(StrokeSrcMixin base, int zoomlevel) {
  strokeSrcMixinClone(base);
  if (zoomlevel >= _strokeMinZoomLevel) {
    double scaleFactor = MapsforgeSettingsMgr().calculateScaleFactor(zoomlevel, _strokeMinZoomLevel);
    _strokeWidth = _strokeWidth * scaleFactor;
    if (_strokeDashArray != null) {
      List<double> newStrokeDashArray = [];
      for (var element in _strokeDashArray!) {
        newStrokeDashArray.add(element * scaleFactor);
      }
      _strokeDashArray = newStrokeDashArray;
    }
  }
}