clipped method

Buffer clipped({
  1. required int clipX,
  2. required int clipY,
  3. required int clipWidth,
  4. required int clipHeight,
})

Returns a Buffer view that silently drops draw calls outside the rectangle (clipX, clipY, clipWidth, clipHeight). The view shares the underlying FFI buffer and validity state; invalidating the parent also invalidates every clipped view. Used by scrolling/clipping containers (e.g. ScrollBox).

Implementation

Buffer clipped({
  required int clipX,
  required int clipY,
  required int clipWidth,
  required int clipHeight,
}) => _ClippedBufferView(
  _ptr,
  _bindings,
  _validity,
  clipX: clipX,
  clipY: clipY,
  clipWidth: clipWidth,
  clipHeight: clipHeight,
);