mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
Merge branch 'dev-6.0' into font
This commit is contained in:
commit
926490502b
@ -267,7 +267,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
|
|||||||
/* Select a character encoding for strings.
|
/* Select a character encoding for strings.
|
||||||
* Your IDE or editor should have the same character encoding
|
* Your IDE or editor should have the same character encoding
|
||||||
* - LV_TXT_ENC_UTF8
|
* - LV_TXT_ENC_UTF8
|
||||||
* - LV_TXT_ENC_ISO8859_1
|
* - LV_TXT_ENC_ASCII
|
||||||
* */
|
* */
|
||||||
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
||||||
|
|
||||||
|
@ -406,7 +406,7 @@
|
|||||||
/* Select a character encoding for strings.
|
/* Select a character encoding for strings.
|
||||||
* Your IDE or editor should have the same character encoding
|
* Your IDE or editor should have the same character encoding
|
||||||
* - LV_TXT_ENC_UTF8
|
* - LV_TXT_ENC_UTF8
|
||||||
* - LV_TXT_ENC_ISO8859_1
|
* - LV_TXT_ENC_ASCII
|
||||||
* */
|
* */
|
||||||
#ifndef LV_TXT_ENC
|
#ifndef LV_TXT_ENC
|
||||||
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
||||||
|
@ -47,7 +47,7 @@ static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i_start);
|
|||||||
static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id);
|
static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id);
|
||||||
static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id);
|
static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id);
|
||||||
static uint32_t lv_txt_utf8_get_length(const char * txt);
|
static uint32_t lv_txt_utf8_get_length(const char * txt);
|
||||||
#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1
|
#elif LV_TXT_ENC == LV_TXT_ENC_ASCII
|
||||||
static uint8_t lv_txt_iso8859_1_size(const char * str);
|
static uint8_t lv_txt_iso8859_1_size(const char * str);
|
||||||
static uint32_t lv_txt_unicode_to_iso8859_1(uint32_t letter_uni);
|
static uint32_t lv_txt_unicode_to_iso8859_1(uint32_t letter_uni);
|
||||||
static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c);
|
static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c);
|
||||||
@ -73,7 +73,7 @@ uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_utf8_pre
|
|||||||
uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_utf8_get_byte_id;
|
uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_utf8_get_byte_id;
|
||||||
uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_utf8_get_char_id;
|
uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_utf8_get_char_id;
|
||||||
uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_length;
|
uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_length;
|
||||||
#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1
|
#elif LV_TXT_ENC == LV_TXT_ENC_ASCII
|
||||||
uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_iso8859_1_size;
|
uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_iso8859_1_size;
|
||||||
uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_iso8859_1;
|
uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_iso8859_1;
|
||||||
uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_iso8859_1_conv_wc;
|
uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_iso8859_1_conv_wc;
|
||||||
@ -677,9 +677,9 @@ static uint32_t lv_txt_utf8_get_length(const char * txt)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1
|
#elif LV_TXT_ENC == LV_TXT_ENC_ASCII
|
||||||
/*******************************
|
/*******************************
|
||||||
* IOS8859-1 ENCODER/DECOER
|
* ASCII ENCODER/DECOER
|
||||||
******************************/
|
******************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,7 +30,7 @@ extern "C" {
|
|||||||
#define LV_TXT_COLOR_CMD "#"
|
#define LV_TXT_COLOR_CMD "#"
|
||||||
|
|
||||||
#define LV_TXT_ENC_UTF8 1
|
#define LV_TXT_ENC_UTF8 1
|
||||||
#define LV_TXT_ENC_ISO8859_1 2
|
#define LV_TXT_ENC_ASCII 2
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* TYPEDEFS
|
* TYPEDEFS
|
||||||
|
@ -283,12 +283,11 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor
|
|||||||
(uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >>
|
(uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >>
|
||||||
6;
|
6;
|
||||||
#else
|
#else
|
||||||
canvas_buf_color[j].ch.red =
|
uint8_t green_canvas = (canvas_buf_color[j].ch.green_h << 3) + (canvas_buf_color[j].ch.green_l);
|
||||||
(uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6;
|
uint8_t green_buf = (copy_buf_color[j].ch.green_h << 3) + (copy_buf_color[j].ch.green_l);
|
||||||
canvas_buf_color[j].ch.blue =
|
uint8_t green_res = (uint16_t)((uint16_t)green_canvas * green_buf) >> 6;
|
||||||
(uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 6;
|
canvas_buf_color[j].ch.green_h = (green_res >> 3) & 0x07;
|
||||||
canvas_buf_color[j].ch.red =
|
canvas_buf_color[j].ch.green_l = green_res & 0x07;
|
||||||
(uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6;
|
|
||||||
#endif /*LV_COLOR_16_SWAP*/
|
#endif /*LV_COLOR_16_SWAP*/
|
||||||
|
|
||||||
#elif LV_COLOR_DEPTH == 8
|
#elif LV_COLOR_DEPTH == 8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user