setUnsafe method

  1. @unsafeNoBoundsChecks
  2. @override
void setUnsafe(
  1. Pos pos,
  2. int pixel
)
inherited

Sets the pixel at the given position without bounds checking.

If outside the bounds of the buffer, the behavior is undefined.

Implementation

@unsafeNoBoundsChecks
@override
void setUnsafe(Pos pos, T pixel) {
  data[_indexAtUnsafe(pos)] = pixel;
}