clipExtent property
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
List<List<double>>? get clipExtent => _x0 == null
? null
: [
[_x0!, _y0!],
[_x1!, _y1!]
];
Implementation
set clipExtent(List<List<double>>? clipExtent) {
if (clipExtent == null) {
_x0 = _y0 = _x1 = _y1 = null;
_postclip = identity;
return;
} else {
_postclip = geoClipRectangle(
_x0 = clipExtent[0][0],
_y0 = clipExtent[0][1],
_x1 = clipExtent[1][0],
_y1 = clipExtent[1][1]);
}
_reset();
}