BlackBerry interview question

How would you implement paints "fill" function?