add arc drawing and restructure draw functions

This commit is contained in:
Gabor Kiss-Vamosi
2018-06-07 15:32:19 +02:00
parent 3890e85527
commit cc1c20d6fe
14 changed files with 1007 additions and 480 deletions

52
lv_draw/lv_draw_arc.h Normal file
View File

@@ -0,0 +1,52 @@
/**
* @file lv_draw_arc.h
*
*/
#ifndef LV_DRAW_ARC_H
#define LV_DRAW_ARC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_draw.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Draw an arc. (Can draw pie too with great thickness.)
* @param center_x the x coordinate of the center of the arc
* @param center_y the y coordinate of the center of the arc
* @param mask the arc will be drawn only in this mask
* @param radius the radius of the arc
* @param start_angle the start angle of the arc (0 deg on the bottom, 90 deg on the right)
* @param end_angle the end angle of the arc
* @param thickness the thickness of the arc (set the `radius` to draw pie)
*/
void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, const lv_area_t * mask, uint16_t radius,
uint16_t start_angle, uint16_t end_angle, uint16_t tickness);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_ARC*/