rename RecalLineBreaks to RecalculateLineBreaks ; use ceil() when computing the origins for lines
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9913 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
83bf0add93
commit
d601f6e882
@ -299,7 +299,7 @@ virtual void _ReservedTextView12();
|
||||
int32 toOffset,
|
||||
bool erase,
|
||||
bool scroll);
|
||||
void RecalLineBreaks(int32 *startLine, int32 *endLine);
|
||||
void RecalculateLineBreaks(int32 *startLine, int32 *endLine);
|
||||
int32 FindLineBreak(int32 fromOffset,
|
||||
float *outAscent,
|
||||
float *outDescent,
|
||||
|
@ -3278,7 +3278,7 @@ BTextView::Refresh(int32 fromOffset, int32 toOffset, bool erase,
|
||||
float saveLineHeight = LineHeight(fromLine);
|
||||
BRect bounds = Bounds();
|
||||
|
||||
RecalLineBreaks(&fromLine, &toLine);
|
||||
RecalculateLineBreaks(&fromLine, &toLine);
|
||||
|
||||
float newHeight = fTextRect.Height();
|
||||
|
||||
@ -3333,7 +3333,7 @@ BTextView::Refresh(int32 fromOffset, int32 toOffset, bool erase,
|
||||
|
||||
|
||||
void
|
||||
BTextView::RecalLineBreaks(int32 *startLine, int32 *endLine)
|
||||
BTextView::RecalculateLineBreaks(int32 *startLine, int32 *endLine)
|
||||
{
|
||||
CALLED();
|
||||
// are we insane?
|
||||
@ -3368,13 +3368,13 @@ BTextView::RecalLineBreaks(int32 *startLine, int32 *endLine)
|
||||
// the new line comes before the old line start, add a line
|
||||
STELine newLine;
|
||||
newLine.offset = toOffset;
|
||||
newLine.origin = curLine->origin + ascent + descent;
|
||||
newLine.origin = ceil(curLine->origin + ascent + descent);
|
||||
newLine.ascent = 0;
|
||||
fLines->InsertLine(&newLine, lineIndex);
|
||||
} else {
|
||||
// update the exising line
|
||||
nextLine->offset = toOffset;
|
||||
nextLine->origin = curLine->origin + ascent + descent;
|
||||
nextLine->origin = ceil(curLine->origin + ascent + descent);
|
||||
|
||||
// remove any lines that start before the current line
|
||||
while ( lineIndex < fLines->NumLines() &&
|
||||
|
Loading…
Reference in New Issue
Block a user