From fcf71fa7bc687c35e11ea719b975d804f13abd8e Mon Sep 17 00:00:00 2001 From: Liu Chao Date: Sun, 27 Oct 2013 14:50:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E6=96=87=E6=9C=AC=E5=9B=BE=E5=B1=82?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E5=83=8F=E5=B0=BA=E5=AF=B8=E6=9C=89=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E6=97=B6=EF=BC=8C=E6=A0=87=E8=AE=B0=E9=87=8D=E7=BB=98?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=BD=8D=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/font/textlayer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/font/textlayer.c b/src/font/textlayer.c index cc737acd..268a2b7f 100755 --- a/src/font/textlayer.c +++ b/src/font/textlayer.c @@ -516,6 +516,10 @@ TextLayer_SetOffset( LCUI_TextLayer *layer, LCUI_Pos offset_pos ) LCUI_API int TextLayer_SetGraphSize( LCUI_TextLayer *layer, LCUI_Size new_size ) { + /* 如果尺寸有变化,则标记需要重绘文本位图 */ + if( layer->graph.h != new_size.h || layer->graph.h != new_size.h ) { + TextLayer_Refresh( layer ); + } return Graph_Create( &layer->graph, new_size.w, new_size.h ); }