FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
241
Copyright © Bridgetek Limited
5.53
CMD_TRACK - track touches for a graphics object
This command will enable co-processor engine to track the touch on the particular
graphics object with one valid tag value assigned. Then, co-processor engine will update
the REG_TRACKER periodically with the frame rate of LCD display panel.
Co-processor engine tracks the graphics object in rotary tracker mode and linear tracker
mode:
rotary tracker mode – Track the angle between the touching point and the center
of graphics object specified by tag value. The value is in units of 1/65536 of a
circle. 0 means that the angle is straight down, 0x4000 left, 0x8000 up, and
0xC000 right from the center.
Linear tracker mode – If parameter w is greater than h, track the relative
distance of touching point to the width of graphics object specified by tag value.
If parameter w is not greater than h, Track the relative distance of touching
point to the height of graphics object specified by tag value. The value is in units
of 1/65536 of the width or height of graphics object. The distance of touching
point refers to the distance from the top left pixel of graphics object to the
coordinate of touching point.
C prototype
void cmd_track( int16_t x,
int16_t y,
int16_t w,
int16_t h,
int16_t tag );
Parameters
x
For linear tracker functionality, x-coordinate of track area top-left, in pixels.
For rotary tracker functionality, x-coordinate of track area center, in pixels.
y
For linear tracker functionality, y-coordinate of track area top-left, in pixels.
For rotary tracker functionality, y-coordinate of track area center, in pixels.
w
Width of track area, in pixels.
h
Height of track area, in pixels.
Please note: