FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
229
Copyright © Bridgetek Limited
5.46
CMD_TRANSLATE - apply a translation to the current
matrix
C prototype
void cmd_translate( int32_t tx,
int32_t ty );
Parameters
tx
x translate factor, in signed 16.16 bit fixed-point form.
ty
y translate factor, in signed 16.16 bit fixed-point form.
Command layout
+0
CMD_TRANSLATE(0xffffff27)
+4
Tx
+8
Ty
Examples
To translate the bitmap 20 pixels to the right:
cmd(BEGIN(BITMAPS));
cmd_loadidentity();
cmd_translate(20 * 65536, 0);
cmd_setmatrix();
cmd(VERTEX2II(68, 28, 0, 0));