Stupid me: kBlackColor is a static, and so it's initialized to 0, so text was drawn in a transparent color, if no default color was specified.

Added +1 to the pen position to draw text more correctly.
Thanks to Andrew for reporting


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10366 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2004-12-07 10:32:04 +00:00
parent 98757be96d
commit 4ce5abc64b

View File

@ -131,7 +131,7 @@ sem_id BTextView::sWidthSem = B_BAD_SEM_ID;
int32 BTextView::sWidthAtom = 0;
#endif
const static rgb_color kBlackColor = { 0, 0, 0 };
const static rgb_color kBlackColor = { 0, 0, 0, 255 };
const static rgb_color kBlueInputColor = { 152, 203, 255 };
const static rgb_color kRedInputColor = { 255, 152, 152 };
@ -393,7 +393,7 @@ BTextView::AttachedToWindow()
BView::AttachedToWindow();
SetDrawingMode(B_OP_COPY);
Window()->SetPulseRate(500000);
fCaretVisible = false;
@ -3728,7 +3728,7 @@ BTextView::DrawLines(int32 startLine, int32 endLine, int32 startOffset,
startLeft += fTextRect.left;
}
view->MovePenTo(startLeft, line->origin + line->ascent + fTextRect.top);
view->MovePenTo(startLeft, line->origin + line->ascent + fTextRect.top + 1);
if (erase && i >= startEraseLine) {
eraseRect.top = line->origin + fTextRect.top;