Fixed bad text antialiasing against the colored background used for input

methods. Fixes #2209.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25349 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-05-07 15:38:09 +00:00
parent 71a7359f67
commit bd78dbf81c

View File

@ -3576,7 +3576,16 @@ BTextView::_DrawLine(BView *view, const int32 &lineNum, const int32 &startOffset
} while ((tabChars + numTabs) < numBytes); } while ((tabChars + numTabs) < numBytes);
} }
if (inputRegion.CountRects() > 0) { drawing_mode textRenderingMode = B_OP_COPY;
if (inputRegion.CountRects() > 0
&& ((offset <= fInline->Offset()
&& fInline->Offset() < offset + tabChars)
|| (fInline->Offset() <= offset
&& offset < fInline->Offset() + fInline->Length()))) {
textRenderingMode = B_OP_OVER;
BRegion textRegion; BRegion textRegion;
GetTextRegion(offset, offset + length, &textRegion); GetTextRegion(offset, offset + length, &textRegion);
@ -3608,6 +3617,7 @@ BTextView::_DrawLine(BView *view, const int32 &lineNum, const int32 &startOffset
const char *stringToDraw = fText->GetString(offset, const char *stringToDraw = fText->GetString(offset,
&returnedBytes); &returnedBytes);
view->SetDrawingMode(textRenderingMode);
view->DrawString(stringToDraw, returnedBytes); view->DrawString(stringToDraw, returnedBytes);
if (foundTab) { if (foundTab) {
float penPos = PenLocation().x - fTextRect.left; float penPos = PenLocation().x - fTextRect.left;