Alright....the x are your mousecoordinates, i think. Well......Just check that value against the values of every polygon (regions in this example) you have. if the x lays inside the boundaries of your region. Then you save the number of this polygon / region. You stay checking, because there might be another region which could be around the x, and which is smaller than the other.
Alright....then you know which polygon you have to fill. (if two polygons intersect, use a function which makes a polygon of it's own which lays around the x).
And you already know how to fill a polygon i s'pose. Just seek the heighest point, and calculate the slope of the right and left and use that...and so on.
Was that what you meant?
------------------
Dance with me......