check out the BackgroundFill class. The methods contained within should allow you to solve this problem.