BlackBerry Interview Question

How would you implement paints "fill" function?