75
« on: September 18, 2023, 11:24:13 AM »
Hi,
Here is an example showing one way to do it.
By using CMD_ROMFONT to assign the font 34 to handle 1, we can get the properties of the font using EVE Screen Editor etc. Using these properties, we can then do the rotation. The translate helps to avoid clipping.
Here is the code and please find an image showing the rotation attached.
CLEAR(1, 1, 1)
CMD_ROMFONT(1,34) //Load the settings of built-in font 34 into bitmap handle 1
BITMAP_LAYOUT_H(0,0)
BITMAP_SIZE(NEAREST, BORDER,BORDER, 0,0) //Update the visible area of bitmap handle 1 to the maximum
CMD_LOADIDENTITY()
CMD_TRANSLATE(4128768, 3276800)
CMD_ROTATE(8192)
CMD_SETMATRIX() //Configure transform matrix of bitmap
CMD_TEXT(77, 111, 1, 0, "TEST-ROTATED") //Draw the text to be rotated
CMD_LOADIDENTITY()
CMD_SETMATRIX() //Restore transform matrix of bitmap
CMD_ROMFONT(1,34) //Re-load the setting of built-in font 34 into bitmap handle 1 to restore the visible area to normal
CMD_TEXT(100, 313, 1, 0, "TEST-Normal") //Draw the normal text
Best Regards, BRT Community