mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-02 12:17:46 +08:00
fix layout.draw 's xbearing
This commit is contained in:
parent
f5055758ca
commit
5114deb694
@ -616,10 +616,10 @@ void Layout::drawText(Canvas&canvas,int firstLine,int lastLine){
|
|||||||
case ALIGN_OPPOSITE:
|
case ALIGN_OPPOSITE:
|
||||||
case ALIGN_RIGHT : x = mWidth - lw ; break;
|
case ALIGN_RIGHT : x = mWidth - lw ; break;
|
||||||
}
|
}
|
||||||
measureSize(line.substr(0,1),te);
|
//measureSize(line,te);
|
||||||
LOGV("line[%d/%d](%d,%d) [%s](%d).width=%d/%d xbearing=%f",lineNum,mLineCount,x,y,TextUtils::unicode2utf8(line).c_str(),
|
LOGV("line[%d/%d](%d,%d) [%s](%d).width=%d/%d",lineNum,mLineCount,x,y,TextUtils::unicode2utf8(line).c_str(),
|
||||||
line.size(),lw,int(te.x_advance),te.x_bearing);
|
line.size(),lw,int(te.x_advance));
|
||||||
canvas.move_to(x + te.x_bearing,y);
|
canvas.move_to(x,y);
|
||||||
canvas.show_text(processBidi(line));
|
canvas.show_text(processBidi(line));
|
||||||
if(mCaretPos>=lineStart&&mCaretPos<lineEnd){
|
if(mCaretPos>=lineStart&&mCaretPos<lineEnd){
|
||||||
measureSize(line.substr(0,mCaretPos-lineStart),te,nullptr);
|
measureSize(line.substr(0,mCaretPos-lineStart),te,nullptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user