2016-06-08 07:25:08 +02:00
|
|
|
/**
|
2017-04-10 11:33:38 +02:00
|
|
|
* @file lv_draw.h
|
2018-06-19 09:49:58 +02:00
|
|
|
*
|
2016-06-08 07:25:08 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LV_DRAW_H
|
|
|
|
#define LV_DRAW_H
|
|
|
|
|
2017-07-09 15:32:49 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-06-08 07:25:08 +02:00
|
|
|
/*********************
|
|
|
|
* INCLUDES
|
|
|
|
*********************/
|
2018-07-07 12:21:36 +02:00
|
|
|
#ifdef LV_CONF_INCLUDE_SIMPLE
|
2018-07-07 11:53:22 +02:00
|
|
|
#include "lv_conf.h"
|
|
|
|
#else
|
2019-03-17 08:33:03 +01:00
|
|
|
#include "../../../lv_conf.h"
|
2018-07-07 11:53:22 +02:00
|
|
|
#endif
|
|
|
|
|
2017-11-30 11:35:33 +01:00
|
|
|
#include "../lv_core/lv_style.h"
|
2017-11-26 11:38:28 +01:00
|
|
|
#include "../lv_misc/lv_txt.h"
|
2019-05-15 05:22:03 +02:00
|
|
|
#include "lv_img_decoder.h"
|
2017-01-02 10:48:21 +01:00
|
|
|
|
2016-06-08 07:25:08 +02:00
|
|
|
/*********************
|
|
|
|
* DEFINES
|
|
|
|
*********************/
|
2019-09-26 15:24:47 +02:00
|
|
|
#ifndef LV_DRAW_BUF_MAX_NUM
|
|
|
|
#define LV_DRAW_BUF_MAX_NUM 8
|
|
|
|
#endif
|
2016-06-08 07:25:08 +02:00
|
|
|
|
|
|
|
/**********************
|
|
|
|
* TYPEDEFS
|
2018-06-19 09:49:58 +02:00
|
|
|
**********************/
|
2019-09-11 06:47:52 +02:00
|
|
|
typedef struct {
|
|
|
|
void * p;
|
|
|
|
uint16_t size;
|
|
|
|
uint8_t used :1;
|
|
|
|
}lv_draw_buf_t;
|
2016-06-08 07:25:08 +02:00
|
|
|
|
|
|
|
/**********************
|
|
|
|
* GLOBAL PROTOTYPES
|
|
|
|
**********************/
|
2017-01-13 23:27:49 +01:00
|
|
|
|
2019-06-26 16:50:10 +02:00
|
|
|
/**
|
|
|
|
* Give a buffer with the given to use during drawing.
|
|
|
|
* Be careful to not use the buffer while other processes are using it.
|
|
|
|
* @param size the required size
|
|
|
|
*/
|
2019-09-11 06:47:52 +02:00
|
|
|
void * lv_draw_buf_get(uint32_t size);
|
2019-06-26 15:42:54 +02:00
|
|
|
|
2019-06-26 16:50:10 +02:00
|
|
|
/**
|
2019-09-11 06:47:52 +02:00
|
|
|
* Release the draw buffer
|
|
|
|
* @param p buffer to release
|
2019-06-26 16:50:10 +02:00
|
|
|
*/
|
2019-09-11 06:47:52 +02:00
|
|
|
void lv_draw_buf_release(void * p);
|
2018-06-12 09:22:45 +02:00
|
|
|
|
|
|
|
/**
|
2019-09-11 06:47:52 +02:00
|
|
|
* Free all draw buffers
|
2018-06-12 09:22:45 +02:00
|
|
|
*/
|
2019-09-11 06:47:52 +02:00
|
|
|
void lv_draw_buf_free_all(void);
|
2018-06-12 09:22:45 +02:00
|
|
|
|
2018-05-20 21:27:57 +02:00
|
|
|
|
|
|
|
/**********************
|
|
|
|
* GLOBAL VARIABLES
|
|
|
|
**********************/
|
|
|
|
|
2016-06-08 07:25:08 +02:00
|
|
|
/**********************
|
|
|
|
* MACROS
|
|
|
|
**********************/
|
|
|
|
|
2018-06-07 15:32:19 +02:00
|
|
|
/**********************
|
|
|
|
* POST INCLUDES
|
|
|
|
*********************/
|
|
|
|
#include "lv_draw_rect.h"
|
|
|
|
#include "lv_draw_label.h"
|
|
|
|
#include "lv_draw_img.h"
|
|
|
|
#include "lv_draw_line.h"
|
|
|
|
#include "lv_draw_triangle.h"
|
2019-06-02 20:35:33 +02:00
|
|
|
#include "lv_draw_arc.h"
|
2019-09-06 12:24:15 +02:00
|
|
|
#include "lv_draw_blend.h"
|
|
|
|
#include "lv_draw_mask.h"
|
2017-07-09 15:32:49 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
2016-06-08 07:25:08 +02:00
|
|
|
#endif
|
2017-07-09 15:32:49 +02:00
|
|
|
|
2019-04-04 07:15:40 +02:00
|
|
|
#endif /*LV_DRAW_H*/
|