macro remames

This commit is contained in:
Gabor Kiss-Vamosi
2017-11-26 13:09:43 +01:00
parent c48a521882
commit 2ff3c37a54
3 changed files with 10 additions and 10 deletions

View File

@@ -102,7 +102,7 @@ void lv_rletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
const uint8_t * bitmap_p = lv_font_get_bitmap(font_p, letter);
uint8_t col, col_sub, row;
#if FONT_ANTIALIAS == 0
#if LV_FONT_ANTIALIAS == 0
for(row = 0; row < font_p->height_row; row ++) {
for(col = 0, col_sub = 7; col < w; col ++, col_sub--) {
if(*bitmap_p & (1 << col_sub)) {
@@ -151,7 +151,7 @@ void lv_rletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
if(px_cnt != 0) {
lv_rpx(pos_p->x + col, pos_p->y + row, mask_p, color_mix(color, LV_COLOR_SILVER, 63 * px_cnt), LV_OPA_COVER);
lv_rpx(pos_p->x + col, pos_p->y + row, mask_p, lv_color_mix(color, LV_COLOR_SILVER, 63 * px_cnt), LV_OPA_COVER);
}
}

View File

@@ -177,9 +177,9 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
/* Calculate the col/row start/end on the map
* If font anti alaiassing is enabled use the reduced letter sizes*/
lv_coord_t col_start = pos_p->x > mask_p->x1 ? 0 : mask_p->x1 - pos_p->x;
lv_coord_t col_end = pos_p->x + (letter_w >> FONT_ANTIALIAS) < mask_p->x2 ? (letter_w >> FONT_ANTIALIAS) : mask_p->x2 - pos_p->x + 1;
lv_coord_t col_end = pos_p->x + (letter_w >> LV_FONT_ANTIALIAS) < mask_p->x2 ? (letter_w >> LV_FONT_ANTIALIAS) : mask_p->x2 - pos_p->x + 1;
lv_coord_t row_start = pos_p->y > mask_p->y1 ? 0 : mask_p->y1 - pos_p->y;
lv_coord_t row_end = pos_p->y + (letter_h >> FONT_ANTIALIAS) < mask_p->y2 ? (letter_h >> FONT_ANTIALIAS) : mask_p->y2 - pos_p->y + 1;
lv_coord_t row_end = pos_p->y + (letter_h >> LV_FONT_ANTIALIAS) < mask_p->y2 ? (letter_h >> LV_FONT_ANTIALIAS) : mask_p->y2 - pos_p->y + 1;
/*Set a pointer on VDB to the first pixel of the letter*/
vdb_buf_tmp += ((pos_p->y - vdb_p->area.y1) * vdb_width)
@@ -189,9 +189,9 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
vdb_buf_tmp += (row_start * vdb_width) + col_start;
/*Move on the map too*/
map_p += ((row_start << FONT_ANTIALIAS) * width_byte) + ((col_start << FONT_ANTIALIAS) >> 3);
map_p += ((row_start << LV_FONT_ANTIALIAS) * width_byte) + ((col_start << LV_FONT_ANTIALIAS) >> 3);
#if FONT_ANTIALIAS != 0
#if LV_FONT_ANTIALIAS != 0
lv_opa_t opa_tmp = opa;
if(opa_tmp != LV_OPA_COVER) opa_tmp = opa_tmp >> 2; /*Opacity per pixel (used when sum the pixels)*/
const uint8_t * map1_p = map_p;
@@ -199,7 +199,7 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
uint8_t px_cnt;
for(row = row_start; row < row_end; row ++) {
col_byte_cnt = 0;
col_bit = 7 - ((col_start << FONT_ANTIALIAS) % 8);
col_bit = 7 - ((col_start << LV_FONT_ANTIALIAS) % 8);
for(col = col_start; col < col_end; col ++) {
px_cnt = 0;

View File

@@ -75,13 +75,13 @@ static inline uint8_t lv_font_get_height(const lv_font_t * font_p)
}
/**
* Get the height of a font. Give the real size on the screen (half size if FONT_ANTIALIAS is enabled)
* Get the height of a font. Give the real size on the screen (half size if LV_FONT_ANTIALIAS is enabled)
* @param font_p pointer to a font
* @return the height of a font
*/
static inline uint8_t lv_font_get_height_scale(const lv_font_t * font_p)
{
return font_p->height_row >> FONT_ANTIALIAS;
return font_p->height_row >> LV_FONT_ANTIALIAS;
}
@@ -94,7 +94,7 @@ static inline uint8_t lv_font_get_height_scale(const lv_font_t * font_p)
uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter);
/**
* Get the width of a letter in a font )Give the real size on the screen (half size if FONT_ANTIALIAS is enabled)
* Get the width of a letter in a font )Give the real size on the screen (half size if LV_FONT_ANTIALIAS is enabled)
* @param font_p pointer to a font
* @param letter a letter
* @return the width of a letter