摘要 |
PROBLEM TO BE SOLVED: To draw an accurate image with high speed and without error when a part of a straight line is drawn or a part of an original image is drawn after scaling. SOLUTION: X0, Y0, X1 and Y1 are any natural numbers satisfying (X1-X0)>(Y1-Y0) and a denominator is u0_d when (Y1-Y0)/(X1-X0) is expressed as an irreducible fraction. A decimal part of Y coordinate value on a line section corresponding to X2 of X coordinate is set to be F and a value of F subtracted from 0.5 is set to be G. If G is a negative value, G is updated by adding 1. When G is expressed in a fraction with the denominator as u0_d, a numerator is set to be H, and a value of H subtracted from u0_d is set to be K. If K is the same as u0_d, K is updated to 0. K is set to be an initial value of a pixel counter and while incrementing the pixel counter by a computer, a region in which the X coordinate of the part of line section starts from X2 is displayed by the computer. COPYRIGHT: (C)2006,JPO&NCIPI |