MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / anim_rotation_callback

Function anim_rotation_callback

Tactility/Source/lvgl/Spinner.cpp:36–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36static void anim_rotation_callback(void* var, int32_t v) {
37 auto* object = (lv_obj_t*) var;
38 auto width = lv_obj_get_width(object);
39 auto height = lv_obj_get_width(object);
40 lv_obj_set_style_transform_pivot_x(object, width / 2, 0);
41 lv_obj_set_style_transform_pivot_y(object, height / 2, 0);
42 lv_obj_set_style_transform_rotation(object, v, 0);
43}
44
45static void spinner_constructor(const lv_obj_class_t* object_class, lv_obj_t* object) {
46 lv_obj_remove_flag(object, LV_OBJ_FLAG_CLICKABLE);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected