EasyManua.ls Logo

Bridgetek FT801 - CMD_ROTATE - Apply a Rotation to the Current Matrix

Default Icon
263 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
227
Product Page
Document Feedback Copyright © Bridgetek Limited
5.45 CMD_ROTATE - apply a rotation to the current matrix
C prototype
void cmd_rotate( int32_t a );
Parameters
a
Clockwise rotation angle, in units of 1/65536 of a circle
Command layout
+0
CMD_ROTATE(0xffffff29)
+4
a
Examples
To rotate the bitmap clockwise by 10 degrees with respect to the top left of the
bitmap:
cmd(BEGIN(BITMAPS));
cmd_loadidentity();
cmd_rotate(10 * 65536 / 360);
cmd_setmatrix();
cmd(VERTEX2II(68, 28, 0, 0));
To rotate the bitmap counter clockwise by 33 degrees wrt top left of the bitmap:
cmd(BEGIN(BITMAPS));
cmd_loadidentity();
cmd_rotate(-33 * 65536 / 360);
cmd_setmatrix();
cmd(VERTEX2II(68, 28, 0, 0));

Table of Contents