
6-6
Using Using Graphics Tools
Programmer’s Manual
6.4.1
Drawing Operators
PPSM supports drawing operators in DrawDot(), DrawHorz(), DrawVert(),
DrawLine(), DrawCircle(), DrawEllipse(), DrawArc(), DrawVector(), DrawRec(),
PutRec(), and ClearRec().
The following tables show the grey level result of a pixel after a drawing operator
is applied.
X is the existing grey level on the screen. Y is the grey level to be put on screen
and R is the final grey level on screen after implementation.
AND_STYLE
OR_STYLE
EXOR_STYLE
Table 6-1 R = X AND Y
X
Y
R
0
0
0
1
0
0
0
1
0
1
1
1
Table 6-2 R = X OR Y
X
Y
R
0
0
0
1
0
1
0
1
1
1
1
1
Table 6-3 R = X EXOR Y
X
Y
R
0
0
0
1
0
1
0
1
1
1
1
0
Personal Portable System Manager
Programmer’s Manual
6-7
REPLACE_STYLE
INVERT_STYLE
6.5
2 bits-per-pixel Graphics
The graphics routine will handle drawing of 4 grey levels: WHITE, LIGHT GREY,
DARK GREY and BLACK.
The byte and bit within byte ordering are both in big-endian format. For example:
The above image will be represented by 11010000100011001100010010000000
in binary and 0xD08CC480 in hexadecimal.
6.5.1
Drawing Operators
PPSM supports drawing operators in DrawDot(), DrawHorz(), DrawVert(),
DrawLine(), DrawCircle(), DrawEllipse(), DrawArc(), DrawVector(), DrawRec(),
Table 6-4 R = Y
X
Y
R
0
0
0
1
0
0
0
1
1
1
1
1
Table 6-5 R = NOT X
X
R
0
1
1
0
BLACK (11)
DARK GREY (10)
LIGHT GREY (01)
WHITE (00)
11 01 00 00 10 00 11 00 11 00 01 00 10 00 00 00
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.