摘要 |
A method for drawing a convex geometric figure to framebuffer storage uses a plurality of update arrays which tile the framebuffer, each having a determined origin with respect to the framebuffer. Each update array has a multiplicity of concurrently updatable pixel storage sites, each specified by an offset from array origin. A figure is specified by a set of directed segments which form its perimeter. To access only those update arrays which tile the figure, the following methodology is used. A first update array which is known to be part of the figure is accessed. Tests are then performed to find whether the figure extends to arrays above or below the accessed array. If so, the array address is stored and marked for either or both extensions. In one embodiment, a test is performed for left extension, and the steps are repeated until no further left extension is found. Returning to the initial array, the steps are repeated for right extension to complete the horizontal subset. The array marked for either up or down extension of the figure is next accessed and the steps are repeated with respect to the indicated vertically adjacent array until no further extension is found in that vertical direction; the steps are then repeated for the other vertical direction. Using this method, the figure is efficiently tiled without duplicating access to any update arrays and without accessing any update arrays that do not tile the figure. |