mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
27 lines
822 B
C
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);
|
|||
|
}
|