copyRect method
Implementation
PCanvasPixels? copyRect(int x, int y, int width, int height) {
  if (width <= 0 || height <= 0) return null;
  var rect = createBlank(width, height);
  rect.setPixelsRectFrom(this, x, y, 0, 0, width, height);
  return rect;
}