clipExtent property

  1. @override
List<List<double>>? clipExtent
override

The projection's viewport clipping extent bounds in pixels.

The extent bounds are specified as an array [[x₀, y₀], [x₁, y₁]], where x₀ is the left-side of the viewport, y₀ is the top, x₁ is the right and y₁ is the bottom. Defaults to null, which represents no viewport clipping. Viewport clipping is independent of small-circle clipping via clipAngle.

See also postclip, geoClipRectangle.

Implementation

@override
get clipExtent => _x0 == null
    ? null
    : [
        [_x0!, _y0!],
        [_x1!, _y1!]
      ];
  1. @override
void clipExtent=(List<List<double>>? _)
override

Implementation

@override
set clipExtent(_) {
  if (_ == null) {
    _x0 = _y0 = _x1 = _y1 = null;
    _postclip = identity;
    return;
  } else {
    _postclip = geoClipRectangle(
        _x0 = _[0][0], _y0 = _[0][1], _x1 = _[1][0], _y1 = _[1][1]);
  }
  _reset();
}