format code

This commit is contained in:
xianjimli 2019-08-14 22:05:56 +08:00
parent ca91b2addd
commit cbe5e0ae2c
2 changed files with 9 additions and 9 deletions

View File

@ -389,7 +389,7 @@
#include "assets/inc/images/visible.data"
#include "assets/inc/images/warn.data"
#include "assets/inc/images/zh.data"
#endif/*WITH_STB_IMAGE*/
#endif /*WITH_STB_IMAGE*/
#ifdef WITH_VGCANVAS
#include "assets/inc/images/ball.bsvg"
#include "assets/inc/images/china.bsvg"
@ -397,13 +397,13 @@
#include "assets/inc/images/pointer.bsvg"
#include "assets/inc/images/pointer_1.bsvg"
#include "assets/inc/images/pointer_4.bsvg"
#endif/*WITH_VGCANVAS*/
#endif /*WITH_VGCANVAS*/
#if defined(WITH_TRUETYPE_FONT)
#include "assets/inc/fonts/default.res"
#else/*WITH_TRUETYPE_FONT*/
#else /*WITH_TRUETYPE_FONT*/
#include "assets/inc/fonts/default.data"
#endif/*WITH_TRUETYPE_FONT*/
#endif/*WITH_FS_RES*/
#endif /*WITH_TRUETYPE_FONT*/
#endif /*WITH_FS_RES*/
ret_t assets_init(void) {
assets_manager_t* rm = assets_manager();
@ -685,7 +685,7 @@ ret_t assets_init(void) {
assets_manager_add(rm, image_pointer);
assets_manager_add(rm, image_pointer_1);
assets_manager_add(rm, image_pointer_4);
#endif/*WITH_VGCANVAS*/
#endif /*WITH_VGCANVAS*/
#endif
tk_init_assets();

View File

@ -179,13 +179,13 @@ static ret_t lcd_reg_8888(lcd_t* lcd, bitmap_t* img, rect_t* src, rect_t* dst) {
for (j = 0; j < dh; j++) {
for (i = 0; i < dw; i++) {
src_color = src_p[i];
if(format == BITMAP_FMT_BGRA8888) {
if (format == BITMAP_FMT_BGRA8888) {
uint8_t r = src_color.rgba.r;
src_color.rgba.r = src_color.rgba.b;
src_color.rgba.b = r;
}
a = src_color.rgba.a;
if (a >= TK_OPACITY_ALPHA) {
write_data_func(color_to_pixel(src_color));
} else if (a >= TK_TRANSPARENT_ALPHA) {
@ -212,7 +212,7 @@ static ret_t lcd_reg_8888(lcd_t* lcd, bitmap_t* img, rect_t* src, rect_t* dst) {
for (i = 0, x = dst->x; x < r; i++, x++) {
uint32_t s = (i * scale_x) >> 16;
src_color = src_p[s];
if(format == BITMAP_FMT_BGRA8888) {
if (format == BITMAP_FMT_BGRA8888) {
uint8_t r = src_color.rgba.r;
src_color.rgba.r = src_color.rgba.b;
src_color.rgba.b = r;