Polygon fill algorithm