module ChunkyPNG::Canvas::Operations

def replace(other, offset_x = 0, offset_y = 0)

def replace(other, offset_x = 0, offset_y = 0)
  check_size_constraints!(other, offset_x, offset_y)
  for y in 0...other.height do
    pixels[(y + offset_y) * width + offset_x, other.width] = other.pixels[y * other.width, other.width]
  end
  self
end