218
Appendix C Drawing Algorithms
Straight Line Drawing Algorithms
•
8-point drawing and 4-point drawing
Figures C-1 (a) and (b) show examples of straight lines plotted on a bit-mapped display.
Circles in the figures represent pixels. Due to the characteristics of a bit-mapped display, a
straight line is drawn with the pixels arranged in a path differing slightly from an actual
straight line. The same line is drawn in figures C-1 (a) and (b), but the algorithms are different,
and so the pixel arrangements are also different. In both figures the line starts at the bottom left
of the figure and is drawn dot by dot toward the top right corner. With the method shown in
figure C-1 (a), the next dot drawn is to the right, or diagonally to the upper right, of the current
dot. With the method shown in figure C-1 (b), on the other hand, the next dot drawn is to the
right of, or directly above, the current dot.
For the sake of convenience, the method in figure C-1 (a) is here called 8-point drawing, and
that in figure C-1 (b), 4-point drawing.
The difference between 8-point and 4-point drawing is illustrated in figure C-2. With 4-point
drawing, the move to draw the next dot can be made in one of only four directions, up, down,
left, or right (figure C-2 (b)). With 8-point drawing, moves can also be made in the four
diagonal directions (figure C-2 (a)).
(a)
(b)
Figure C-1 Two Representations of a Straight Line on a Raster Display
Содержание HD64411 Q2
Страница 17: ...10 ...
Страница 31: ...24 ...
Страница 108: ...101 Example 0 0 Work coordinates Rendering coordinates XC YC ...
Страница 110: ...103 Example Old XC YC Old XC XC old YC YC 0 0 Work coordinates Rendering coordinates XC YC ...
Страница 112: ...105 Example 0 0 Work coordinates Rendering coordinates XO1 YO1 XO1 DX2 YO1 DY2 XO1 DX1 YO1 DY1 LINE ...
Страница 116: ...109 Example 0 0 Work coordinates Rendering coordinates XMIN YMIN XMAX YMAX ...
Страница 118: ...111 Example 0 0 Work coordinates Rendering coordinates XMAX YMAX ...
Страница 120: ...113 Example 0 0 Work coordinates XMIN YMIN XMAX YMAX ...
Страница 129: ...122 ...
Страница 167: ...160 ...
Страница 179: ...172 ...
Страница 213: ...206 Figure 7 20 TV Sync Mode Display Timing When DOT 0 or DOT 1 and EXHSYNC cycle is even multiple of CLK1 cycle ...