![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_38.png)
6-18
Using Using Graphics Tools
Programmer’s Manual
/* set dot width to 2 */
SetDotWidth(2, 0);
/* draw a dot at (52, 52) */
ret = DrawDot(BLACK, 52, 52, REPLACE_STYLE);
When the dot width equals 2, a square dot with length of 2 will be drawn.
Example 6-9 Draw a dot with dot width 3
STATUS ret;
/* set dot width to 3 */
SetDotWidth(3, 0);
/* draw a dot at (52, 52 */
ret = DrawDot(BLACK, 52, 52, REPLACE_STYLE);
When the dot width is 3, a circular disc with radius of (3-1)/2 (which is 1) will In this example, the dot width is 1. The calling of DrawHorz(BLACK, 30, 60, 551,
drawn.
Example 6-10 Draw a dot with dot width 4
STATUS ret;
Figure 6-5 Screen output for Example 6-7
LCD
Panning Screen
(52, 52)
(50, 50)
(0, 0)
Figure 6-6 Screen output for Example 6-8
(52, 52)
Figure 6-7 Screen output for Example 6-9
(52, 52)
Personal Portable System Manager
Programmer’s Manual
6-19
/* set dot width to 4 */
SetDotWidth(4, 0);
/* draw a dot at (52, 52) */
ret = DrawDot(BLACK, 52, 52, REPLACE_STYLE);
When the dot width is 4, a circular disc with radius of (4-1)/2 (which is 1) will be
drawn.
6.18
Draw a Horizontal Line
STATUS
DrawHorz
(U16
dotLine U16
)
This routine will draw a horizontal line from (xSrc, ySrc) to (xSrc + width - 1, ySrc).
If the dot width is greater than 1, the specified horizontal line will have integer
truncated of (dot width - 1)/2 horizontal lines above it, and (dot width)/2 horizontal
lines below it. The length of each of these lines will be extended by (dotwidth - 1)/
2 pixels to the left of the source, and by (dotwidth/2) pixels to the right of the end
point.
If the width of the horizontal line is 1, a square dot will be drawn.
Example 6-11 Draw a horizontal black line
STATUS ret;
/* draw a black horizontal line from (30, 60) with width 551 */
ret = DrawHorz(BLACK, 30, 60, 551, 0, REPLACE_STYLE);
0, REPLACE_STYLE) will draw a black horizontal line from (30, 60) to (580, 60)
on panning screen. Only the portion of (50, 60) to (369, 60) will be seen on LCD
display.
Figure 6-8 Screen output for
(52, 52)
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.