Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/libs/lvgl/lv_misc/lv_circ.h
1476 views
1
/**
2
* @file lv_circ.h
3
*
4
*/
5
6
#ifndef LV_CIRC_H
7
#define LV_CIRC_H
8
9
#ifdef __cplusplus
10
extern "C" {
11
#endif
12
13
14
/*********************
15
* INCLUDES
16
*********************/
17
#include <stddef.h>
18
#include "lv_area.h"
19
#include <utils/types.h>
20
21
/*********************
22
* DEFINES
23
*********************/
24
#define LV_CIRC_OCT1_X(p) (p.x)
25
#define LV_CIRC_OCT1_Y(p) (p.y)
26
#define LV_CIRC_OCT2_X(p) (p.y)
27
#define LV_CIRC_OCT2_Y(p) (p.x)
28
#define LV_CIRC_OCT3_X(p) (-p.y)
29
#define LV_CIRC_OCT3_Y(p) (p.x)
30
#define LV_CIRC_OCT4_X(p) (-p.x)
31
#define LV_CIRC_OCT4_Y(p) (p.y)
32
#define LV_CIRC_OCT5_X(p) (-p.x)
33
#define LV_CIRC_OCT5_Y(p) (-p.y)
34
#define LV_CIRC_OCT6_X(p) (-p.y)
35
#define LV_CIRC_OCT6_Y(p) (-p.x)
36
#define LV_CIRC_OCT7_X(p) (p.y)
37
#define LV_CIRC_OCT7_Y(p) (-p.x)
38
#define LV_CIRC_OCT8_X(p) (p.x)
39
#define LV_CIRC_OCT8_Y(p) (-p.y)
40
41
/**********************
42
* TYPEDEFS
43
**********************/
44
45
/**********************
46
* GLOBAL PROTOTYPES
47
**********************/
48
49
/**
50
* Initialize the circle drawing
51
* @param c pointer to a point. The coordinates will be calculated here
52
* @param tmp point to a variable. It will store temporary data
53
* @param radius radius of the circle
54
*/
55
void lv_circ_init(lv_point_t * c, lv_coord_t * tmp, lv_coord_t radius);
56
57
/**
58
* Test the circle drawing is ready or not
59
* @param c same as in circ_init
60
* @return true if the circle is not ready yet
61
*/
62
bool lv_circ_cont(lv_point_t * c);
63
64
/**
65
* Get the next point from the circle
66
* @param c same as in circ_init. The next point stored here.
67
* @param tmp same as in circ_init.
68
*/
69
void lv_circ_next(lv_point_t * c, lv_coord_t * tmp);
70
71
/**********************
72
* MACROS
73
**********************/
74
75
#ifdef __cplusplus
76
} /* extern "C" */
77
#endif
78
79
80
#endif
81
82