Fill Area Primitives To Character Generation'
Fill Area Primitives To Character Generation'
Shobhanjana Kalita,
Dept. of CSE, Tezpur University
Filled Area Primitives
2 basic approaches to area filling on raster systems
Determine overlap intervals for scan lines that cross the area
Typically used in general graphics packages to fill polygons,
circles, ellipses, and other simple curves.
Start from a given interior position and paint outward from
this point until we encounter the specified boundary
conditions
Useful with more complex boundaries and in interactive
painting systems
Scan Line Polygon Fill
Scan line is one line, or row, in a raster scanning pattern
Such as a line of video on a cathode ray tube (CRT) display of a
television set or computer monitor
For each scan line crossing a polygon, the area-fill algorithm
locates the intersection points of the scan line with the
polygon edges
sorted from left to right, and corresponding frame-buffer
positions between each intersection pair are set to fill colour
Scan Line Polygon Fill
In case of odd
number of
intersections, count
the point which is a
vertex as two points
Scan Line Polygon Fill
To resolve, shorten some polygon edges to split those
vertices that should be counted as one intersection
Process non-horizontal edges around the polygon boundary
in the order specified, clockwise or counter-clockwise
As we process each edge, check to determine whether that
edge and the next non-horizontal edge have either
monotonically increasing or decreasing endpoint y values
If so, the lower edge can be shortened to ensure that only one
intersection point is generated for the scan line going
through the common vertex joining the two edges
Scan Line Polygon Fill