摘要 |
PROBLEM TO BE SOLVED: To provide a technique that can inexpensively draw lines with less aliasing. SOLUTION: From two vertex coordinates given to a line 66 to be drawn, an edge function is calculated. The gradient of the edge function is next determined. If an acute angle between the line 66 to be drawn and the x-axis of a drawing plane coordinate system is not larger than 45°, functions of two shift lines 68 to which the line 66 to be drawn is translated by 0.5d and -0.5d along the y-axis are calculated, where (d) is the width of one pixel. If the acute angle between the line 66 to be drawn and the y-axis of the drawing plane coordinate system is larger than 45°, functions of two shift lines to which the line 66 to be drawn is translated by 0.5d and -0.5d along the x-axis are calculated. Sub pixels included in a parallelogram abcd whose vertices are four start points and end points of the two shift lines 68 are next counted, and a pixel value of each pixel is set accordingly. COPYRIGHT: (C)2009,JPO&INPIT |