The traditional edge marking algorithm cannot fill the elongated polygon and a polygon with local points correctly. After doing a lot of research and analysis about polygon fill algorithms, this paper presents a new improved algorithm, which is suitable for hardware implementation, to meet the need for high-quality graphic display in the embedded system. The new algorithm makes full use of the characteristic that the local point or elongated point is accessed repeatedly when it meets local points and elongated points. We can define a measurement variable named FLAG, which is used to mark the boundary point of the polygon. The flag of the present point will add one when it is accessed. This method can conveniently and simply distinguish singular points and elongated points from ordinary points. What's more, the improved algorithm solves the previously mentioned problems effectively. In the new algorithm, we only use the addition operation so it is easy to be implemented by the hardware.
展开▼