fix font color

This commit is contained in:
houzh 2023-05-04 12:57:07 +00:00
parent dd52bcf429
commit 23d9ddfd81

View File

@ -570,10 +570,7 @@ static const std::string processBidi(const std::wstring&logstr){
void Layout::drawText(Canvas&canvas,int firstLine,int lastLine){
mCaretRect.setEmpty();
canvas.save();
canvas.set_font_face(mTypeface->getFontFace());
canvas.set_font_size(mFontSize);
canvas.set_source_rgb(1,0,0);
for (int lineNum = firstLine; lineNum < lastLine; lineNum++) {
int x=0,lw=getLineWidth(lineNum,true);
TextExtents te;
@ -603,7 +600,6 @@ void Layout::drawText(Canvas&canvas,int firstLine,int lastLine){
mCaretRect.width = te.x_advance;
}
}
canvas.restore();
}
void Layout::draw(Canvas&canvas){