pikapython/package/pika_lvgl/pika_lvgl_arc.c
李昂 71364445e0 !27 add lvgl package and examples
* support event for lvgl
* add example for lvgl
* adding const
* support core-widget for lvgl
* add lvgl package
2022-06-15 12:31:31 +00:00

27 lines
822 B
C

#include "pika_lvgl_arc.h"
#include "BaseObj.h"
#include "lvgl.h"
#include "pika_lvgl.h"
#include "pika_lvgl_lv_obj.h"
void pika_lvgl_arc___init__(PikaObj* self, PikaObj* parent) {
lv_obj_t* lv_parent = obj_getPtr(parent, "lv_obj");
lv_obj_t* lv_obj = lv_arc_create(lv_parent);
obj_setPtr(self, "lv_obj", lv_obj);
}
void pika_lvgl_arc_set_end_angle(PikaObj* self, int angle) {
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
lv_arc_set_end_angle(lv_obj, angle);
}
void pika_lvgl_arc_set_bg_angles(PikaObj* self, int end, int start) {
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
lv_arc_set_bg_angles(lv_obj, start, end);
}
void pika_lvgl_arc_set_angles(PikaObj* self, int end, int start) {
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
lv_arc_set_angles(lv_obj, start, end);
}