There are two major ways to fill a general area, boundary fill and flood fill.
Boundary Fill Algorithm
Flood-Fill Algorithm
Demonstration of the Boundary Fill Algorithm
Solid Polygon menu HyperGraph Table of Contents. HyperGraph Home page.