mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 03:58:33 +08:00
format code
This commit is contained in:
parent
07a2d808d3
commit
149bb7d040
@ -1883,17 +1883,20 @@ ret_t canvas_fill_rounded_rect(canvas_t* c, rect_t* r, rect_t* bg_r, color_t* co
|
||||
|
||||
ret_t canvas_stroke_rounded_rect(canvas_t* c, rect_t* r, rect_t* bg_r, color_t* color,
|
||||
uint32_t radius, uint32_t border_width) {
|
||||
return ffr_draw_stroke_rounded_rect_ex(c, r, bg_r, color, radius, radius, radius, radius, border_width);
|
||||
return ffr_draw_stroke_rounded_rect_ex(c, r, bg_r, color, radius, radius, radius, radius,
|
||||
border_width);
|
||||
}
|
||||
|
||||
ret_t canvas_fill_rounded_rect_ex(canvas_t* c, rect_t* r, rect_t* bg_r, color_t* color,
|
||||
uint32_t radius_tl, uint32_t radius_tr,
|
||||
uint32_t radius_bl, uint32_t radius_br) {
|
||||
return ffr_draw_fill_rounded_rect_ex(c, r, bg_r, color, radius_tl, radius_tr, radius_bl, radius_br);
|
||||
uint32_t radius_tl, uint32_t radius_tr, uint32_t radius_bl,
|
||||
uint32_t radius_br) {
|
||||
return ffr_draw_fill_rounded_rect_ex(c, r, bg_r, color, radius_tl, radius_tr, radius_bl,
|
||||
radius_br);
|
||||
}
|
||||
|
||||
ret_t canvas_stroke_rounded_rect_ex(canvas_t* c, rect_t* r, rect_t* bg_r, color_t* color,
|
||||
uint32_t radius_tl, uint32_t radius_tr,
|
||||
uint32_t radius_bl, uint32_t radius_br, uint32_t border_width) {
|
||||
return ffr_draw_stroke_rounded_rect_ex(c, r, bg_r, color, radius_tl, radius_tr, radius_bl, radius_br, border_width);
|
||||
uint32_t radius_tl, uint32_t radius_tr, uint32_t radius_bl,
|
||||
uint32_t radius_br, uint32_t border_width) {
|
||||
return ffr_draw_stroke_rounded_rect_ex(c, r, bg_r, color, radius_tl, radius_tr, radius_bl,
|
||||
radius_br, border_width);
|
||||
}
|
||||
|
@ -761,8 +761,8 @@ ret_t canvas_fill_rounded_rect(canvas_t* c, rect_t* r, rect_t* bg_r, color_t* co
|
||||
* @return {ret_t} 返回RET_OK表示成功,否则表示失败。
|
||||
*/
|
||||
ret_t canvas_fill_rounded_rect_ex(canvas_t* c, rect_t* r, rect_t* bg_r, color_t* color,
|
||||
uint32_t radius_tl, uint32_t radius_tr,
|
||||
uint32_t radius_bl, uint32_t radius_br);
|
||||
uint32_t radius_tl, uint32_t radius_tr, uint32_t radius_bl,
|
||||
uint32_t radius_br);
|
||||
|
||||
/**
|
||||
* @method canvas_stroke_rounded_rect
|
||||
@ -795,8 +795,8 @@ ret_t canvas_stroke_rounded_rect(canvas_t* c, rect_t* r, rect_t* bg_r, color_t*
|
||||
* @return {ret_t} 返回RET_OK表示成功,否则表示失败。
|
||||
*/
|
||||
ret_t canvas_stroke_rounded_rect_ex(canvas_t* c, rect_t* r, rect_t* bg_r, color_t* color,
|
||||
uint32_t radius_tl, uint32_t radius_tr,
|
||||
uint32_t radius_bl, uint32_t radius_br, uint32_t border_width);
|
||||
uint32_t radius_tl, uint32_t radius_tr, uint32_t radius_bl,
|
||||
uint32_t radius_br, uint32_t border_width);
|
||||
|
||||
/**
|
||||
* @method canvas_end_frame
|
||||
|
@ -620,7 +620,7 @@ static ret_t text_edit_paint_real_text(text_edit_t* text_edit, canvas_t* c) {
|
||||
|
||||
/*FIXME: 密码编辑时,*字符本身偏高,看起来不像居中。但是无法拿到字模信息,只好手工修正一下。*/
|
||||
if (impl->mask && impl->mask_char == '*') {
|
||||
y += c->font_size/6;
|
||||
y += c->font_size / 6;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -1309,9 +1309,11 @@ ret_t widget_fill_rect(widget_t* widget, canvas_t* c, rect_t* r, bool_t bg,
|
||||
canvas_set_fill_color(c, color);
|
||||
if (radius_tl > 3 || radius_tr > 3 || radius_bl > 3 || radius_br > 3) {
|
||||
if (bg) {
|
||||
ret = canvas_fill_rounded_rect_ex(c, r, NULL, &color, radius_tl, radius_tr, radius_bl, radius_br);
|
||||
ret = canvas_fill_rounded_rect_ex(c, r, NULL, &color, radius_tl, radius_tr, radius_bl,
|
||||
radius_br);
|
||||
} else {
|
||||
ret = canvas_fill_rounded_rect_ex(c, r, &bg_r, &color, radius_tl, radius_tr, radius_bl, radius_br);
|
||||
ret = canvas_fill_rounded_rect_ex(c, r, &bg_r, &color, radius_tl, radius_tr, radius_bl,
|
||||
radius_br);
|
||||
}
|
||||
if (ret == RET_FAIL) {
|
||||
canvas_fill_rect(c, r->x, r->y, r->w, r->h);
|
||||
@ -1384,7 +1386,8 @@ ret_t widget_stroke_border_rect(widget_t* widget, canvas_t* c, rect_t* r) {
|
||||
canvas_set_stroke_color(c, bd);
|
||||
if (radius_tl > 3 || radius_tr > 3 || radius_bl > 3 || radius_br > 3) {
|
||||
if (border == BORDER_ALL) {
|
||||
if (canvas_stroke_rounded_rect_ex(c, r, NULL, &bd, radius_tl, radius_tr, radius_bl, radius_br, border_width) != RET_OK) {
|
||||
if (canvas_stroke_rounded_rect_ex(c, r, NULL, &bd, radius_tl, radius_tr, radius_bl,
|
||||
radius_br, border_width) != RET_OK) {
|
||||
widget_stroke_border_rect_for_border_type(c, r, bd, border, border_width);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user