摘要 |
PURPOSE:To paint out the inner area of a polygon without painting out respective sides of the polygon by drawing straight lines not to be superposed to horizontal sides out of straight lines connecting start points with end points on the basis of all the side information of the polygon in the inner area and painting out the inner area. CONSTITUTION:The start points of respective sides of the polygon are registered in a memory 3 and displayed on a display part 9. Then, side information on y=n is read out from a data base by setting up a y coordinate value as the minimum value of the y coordinates of the polygon and registered in an edge table ET. Side data registered in the ET are sorted and replaced in the ascending order of the x coordinate values and read out in the ascending order. The start and end points of each read x coordinate value are calculated by a calculating part 13, and when the straight line connecting the start point with the end point is not superposed to a horizontal side, a straight line is drawn by a straight line generator 5. When both the lines are superposed to each other, straight line data are not applied to the generator 5 and no straight line is drawn. Since a straight line superposed to horizontal lines of the polygon is not drawn, the inner closed area excluding respective sides of the polygon can be painted out. |