27 GRAPHICS ENGINE (GE)
27-6
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
Work area
(Clipping area)
X
Y
(0, 0)
(X, Y)
3.2.1 Dot Drawing
Figure 27.
Straight line
Straight line drawing / LINE command (0x11)
Draws a line between the two points specified in X and Y coordinates with the specified color. The line
width can also be specified in number of pixels. Not only horizontal and vertical lines but also oblique lines
can be drawn according to the specified coordinates.
Work area
(Clipping area)
X1
Y1
(0, 0)
Width
(X2, Y2)
Y2
X2
(X1, Y1)
3.2.2 Straight Line Drawing
Figure 27.
Oblique lines with two pixels or more line width are drawn as follows:
(1) When 315° < slope < 45° (135° < slope < 225°): Both ends are drawn vertically.
(2) When 45°
≤
slope
≤
135° (225°
≤
slope
≤
315°): Both ends are drawn horizontally.
Width
Width
45
°
≤
slope
≤
135
°
(225
°
≤
slope
≤
315
°
)
315
°
< slope < 45
°
(135
°
< slope < 225
°
)
3.2.3 Drawing Oblique Line
Figure 27.
When an odd number is specified as the line width, the X and Y coordinates specified becomes the center of
the line width. When an even number is specified as the line width, the left or upper side from the specified
axis will be thicker by one pixel than the right or lower side.