Implementing the bucket fill.