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_rect.h

88 lines
1.9 KiB
C
Raw Normal View History

/**
* @file lv_draw_rect.h
*
*/
#ifndef LV_DRAW_RECT_H
#define LV_DRAW_RECT_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_draw.h"
2019-12-14 23:39:26 +01:00
#include "../lv_core/lv_style.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
2019-12-14 23:39:26 +01:00
typedef struct {
2019-12-19 23:16:53 +01:00
lv_style_value_t radius;
/*Background*/
2019-12-14 23:39:26 +01:00
lv_color_t bg_color;
lv_color_t bg_grad_color;
2019-12-19 23:16:53 +01:00
lv_grad_dir_t bg_grad_dir;
lv_style_value_t bg_main_color_stop;
lv_style_value_t bg_grad_color_stop;
2019-12-19 23:16:53 +01:00
lv_blend_mode_t bg_blend_mode;
lv_opa_t bg_opa;
/*Border*/
2019-12-14 23:39:26 +01:00
lv_color_t border_color;
2019-12-19 23:16:53 +01:00
lv_style_value_t border_width;
2019-12-14 23:39:26 +01:00
lv_blend_mode_t border_blend_mode;
lv_style_value_t border_part;
2019-12-19 23:16:53 +01:00
lv_opa_t border_opa;
/*Shadow*/
lv_color_t shadow_color;
lv_style_value_t shadow_width;
2019-12-19 23:16:53 +01:00
lv_style_value_t shadow_ofs_x;
lv_style_value_t shadow_ofs_y;
lv_style_value_t shadow_spread;
lv_style_value_t shadow_blend_mode;
2019-12-19 23:16:53 +01:00
lv_opa_t shadow_opa;
2019-12-14 23:39:26 +01:00
}lv_draw_rect_dsc_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
2019-12-14 23:39:26 +01:00
void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc);
/**
* Draw a rectangle
* @param coords the coordinates of the rectangle
* @param mask the rectangle will be drawn only in this mask
* @param style pointer to a style
*/
void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, lv_draw_rect_dsc_t * dsc);
2019-11-05 06:29:53 +01:00
/**
* Draw a pixel
* @param point the coordinates of the point to draw
* @param mask the pixel will be drawn only in this mask
* @param style pointer to a style
*/
void lv_draw_px(const lv_point_t * point, const lv_area_t * clip_area, const lv_style_t * style);
2019-11-05 06:29:53 +01:00
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_RECT_H*/