What is the API used for changing the angle of LVGL objects?

Just as we have API “lv_img_set_angle(,)” for changing the angle of the image, How do we do the same for the Object that’s a “text” instead of an “image”?

You can use lv_obj_set_style_transform_angle(obj, angle, LV_PART_MAIN);.

Thanks for this. It worked out great for what I needed it to. I did want to mention since this function is not in the documentation that the “angle” parameter is the angle times 10. This allows for a float precision of 0.1. An angle of 272.5 would read 2725. an angle of zero is at the 3:00 position and 90 at 6:00, 180 at 9:00 and 270 at 12:00 so the rotation is clockwise.

also worth mentioning is negative angles do not work.

question on this tho. since it is a uint16_t that is used for the angle position why not have it use the entire thing and give a greater precision? add the additional decimal to use up the majority of the uint16_t. or maybe allowing negative angles instead of the additional precision.