![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_46.png)
6-34
Using Using Graphics Tools
Programmer’s Manual
6.29
Fill a Rectangular Area
STATUS
ClearRec
(U16 greyLevel U16 xSrc U16 ySrc U16 width U16
height U16 style)
This routine fills an rectangular area with the specified grey level.
Example 6-29 Fill a rectangular region with BLACK and OR style
STATUS ret;
/* fill a rectangular area with top left corner at (300, 240), width 261 and height
161 */
ret = ClearRec(BLACK, 300, 240, 261, 161, OR_STYLE);
This example fills the rectangular region from top left corner at (300, 240) on
panning screen with width 261 pixels and height 161 pixels.
6.30
Inverse a Rectangular Area
STATUS
InvRec
(U16 xSrc U16 ySrc U16 width U16 height)
This routine will inverse the grey level of the rectangular area with top left corCursorSetStatus(PPSM_CURSOR_OFF).
at (xSrc, ySrc) and bottom right corner at (xSrc + width - 1, ySrc + height - 1).
Example 6-30 Inverse a rectangular region
STATUS ret;
/* inverse a rectangular area with top left corner at (250, 200), width 200 and
height 100 */
ret = InvRec(250, 200, 200, 100);
Figure 6-29 Screen output for Example 6-29
LCD
Panning Screen
(50, 50)
(0, 0)
(560, 400)
(300, 240)
Personal Portable System Manager
Programmer’s Manual
6-35
In this example, the LCD display screen is black and the rest of the panning
screen is white. After inverting the rectangular region with top left corner at (250,
200) and 200 pixels wide by 100 pixels high, a white box can be seen in the LCD
screen at bottom right position.
6.31
Hardware Cursor
When there is no hardware cursor in current task, the creation of hardware cursor
requires to set the cursor characteristic and follows by calling
CursorSetStatus(PPSM_CURSOR_ON).
When hardware cursor is created and it needs to be turned off, the application
should call CursorOff(). If the application needs to turn on the cursor once again. It
has to set the cursor characteristic and follows by calling
CursorSetStatus(PPSM_CURSOR_ON) again.
When hardware cursor is to be suspended, the application should call
A application can change the hardware cursor to new position. It can inquire the
hardware cursor status from the system. When the hardware cursor is ON, the
calling of functions to change the size or position of the hardware cursor will have
immediate effect.
6.31.1
Set Hardware Cursor Size
STATUS
CursorInit
(U16
)
This routine will change the hardware cursor width and height. The valid range for
both width and height is from 1 through 31.
Example 6-31 When there is no hardware cursor in current task:
/* set hardware cursor position at (150, 150) */
CursorSetPos(150, 158);
Figure 6-30 Screen output for
(50, 50)
(0, 0)
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.