1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00
lvgl/src/lv_draw/lv_draw.h

98 lines
2.3 KiB
C
Raw Normal View History

2016-06-08 07:25:08 +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
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
2019-03-17 08:33:03 +01:00
#include "../../../lv_conf.h"
#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"
#include "../lv_misc/lv_img_decoder.h"
2017-01-02 10:48:21 +01:00
2016-06-08 07:25:08 +02:00
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
2018-06-19 09:49:58 +02:00
**********************/
2016-06-08 07:25:08 +02:00
2018-02-09 12:40:00 +01:00
2016-06-08 07:25:08 +02:00
/**********************
* GLOBAL PROTOTYPES
**********************/
#if LV_ANTIALIAS
/**
* Get the opacity of a pixel based it's position in a line segment
* @param seg segment length
* @param px_id position of of a pixel which opacity should be get [0..seg-1]
* @param base_opa the base opacity
* @return the opacity of the given pixel
*/
2018-06-19 09:49:58 +02:00
lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa);
/**
* Add a vertical anti-aliasing segment (pixels with decreasing opacity)
* @param x start point x coordinate
* @param y start point y coordinate
* @param length length of segment (negative value to start from 0 opacity)
* @param mask draw only in this area
* @param color color of pixels
* @param opa maximum opacity
*/
2019-04-04 07:15:40 +02:00
void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask,
lv_color_t color, lv_opa_t opa);
/**
* Add a horizontal anti-aliasing segment (pixels with decreasing opacity)
* @param x start point x coordinate
* @param y start point y coordinate
* @param length length of segment (negative value to start from 0 opacity)
* @param mask draw only in this area
* @param color color of pixels
* @param opa maximum opacity
*/
2019-04-04 07:15:40 +02:00
void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask,
lv_color_t color, lv_opa_t opa);
#endif
/**********************
* GLOBAL VARIABLES
**********************/
2016-06-08 07:25:08 +02:00
/**********************
* MACROS
**********************/
/**********************
* POST INCLUDES
*********************/
2019-02-13 01:40:22 +01:00
#include "lv_draw_basic.h"
#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"
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*/