2018-06-07 15:32:19 +02:00
|
|
|
/**
|
|
|
|
* @file lv_draw_triangle.h
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LV_DRAW_TRIANGLE_H
|
|
|
|
#define LV_DRAW_TRIANGLE_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*********************
|
|
|
|
* INCLUDES
|
|
|
|
*********************/
|
2020-02-15 00:33:26 +01:00
|
|
|
#include "lv_draw_rect.h"
|
2018-06-07 15:32:19 +02:00
|
|
|
|
|
|
|
/*********************
|
|
|
|
* DEFINES
|
|
|
|
*********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* TYPEDEFS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* GLOBAL PROTOTYPES
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**
|
2019-11-13 16:44:20 +01:00
|
|
|
* Draw a triangle
|
2018-06-07 15:32:19 +02:00
|
|
|
* @param points pointer to an array with 3 points
|
2019-11-13 16:44:20 +01:00
|
|
|
* @param clip_area the triangle will be drawn only in this area
|
2020-02-15 00:33:26 +01:00
|
|
|
* @param draw_dsc pointer to an initialized `lv_draw_rect_dsc_t` variable
|
2018-06-07 15:32:19 +02:00
|
|
|
*/
|
2020-08-05 10:53:03 +02:00
|
|
|
void lv_draw_triangle(const lv_point_t points[], const lv_area_t * clip, const lv_draw_rect_dsc_t * draw_dsc);
|
2018-06-07 15:32:19 +02:00
|
|
|
|
2019-06-02 20:35:33 +02:00
|
|
|
/**
|
2019-11-13 16:44:20 +01:00
|
|
|
* Draw a polygon. Only convex polygons are supported.
|
2019-06-02 20:35:33 +02:00
|
|
|
* @param points an array of points
|
|
|
|
* @param point_cnt number of points
|
2019-11-13 16:44:20 +01:00
|
|
|
* @param clip_area polygon will be drawn only in this area
|
2020-02-15 00:33:26 +01:00
|
|
|
* @param draw_dsc pointer to an initialized `lv_draw_rect_dsc_t` variable
|
2019-06-02 20:35:33 +02:00
|
|
|
*/
|
2020-05-12 01:08:50 +03:00
|
|
|
void lv_draw_polygon(const lv_point_t points[], uint16_t point_cnt, const lv_area_t * mask,
|
2020-08-05 10:53:03 +02:00
|
|
|
const lv_draw_rect_dsc_t * draw_dsc);
|
2019-06-02 20:35:33 +02:00
|
|
|
|
2018-06-07 15:32:19 +02:00
|
|
|
/**********************
|
|
|
|
* MACROS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /*LV_DRAW_TRIANGLE_H*/
|