Replaced ceil with ceilf in a number of places

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16601 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-03-06 11:15:53 +00:00
parent ace32536d4
commit 8013da5719
+9 -9
View File
@@ -1733,8 +1733,8 @@ BTextView::PointAt(int32 inOffset, float *outHeight) const
result.x += fTextRect.left;// - 1.0; result.x += fTextRect.left;// - 1.0;
// round up // round up
result.x = ceil(result.x); result.x = ceilf(result.x);
result.y = ceil(result.y); result.y = ceilf(result.y);
if (outHeight != NULL) if (outHeight != NULL)
*outHeight = height; *outHeight = height;
@@ -1922,7 +1922,7 @@ BTextView::TextHeight(int32 startLine, int32 endLine) const
if (endLine == numLines - 1 && (*fText)[fText->Length() - 1] == '\n') if (endLine == numLines - 1 && (*fText)[fText->Length() - 1] == '\n')
height += (*fLines)[endLine + 1]->origin - (*fLines)[endLine]->origin; height += (*fLines)[endLine + 1]->origin - (*fLines)[endLine]->origin;
return ceil(height); return ceilf(height);
} }
@@ -1943,8 +1943,8 @@ BTextView::GetTextRegion(int32 startOffset, int32 endOffset, BRegion *outRegion)
BPoint startPt = PointAt(startOffset, &startLineHeight); BPoint startPt = PointAt(startOffset, &startLineHeight);
BPoint endPt = PointAt(endOffset, &endLineHeight); BPoint endPt = PointAt(endOffset, &endLineHeight);
startLineHeight = ceil(startLineHeight); startLineHeight = ceilf(startLineHeight);
endLineHeight = ceil(endLineHeight); endLineHeight = ceilf(endLineHeight);
BRect selRect; BRect selRect;
@@ -3234,13 +3234,13 @@ BTextView::RecalculateLineBreaks(int32 *startLine, int32 *endLine)
// the new line comes before the old line start, add a line // the new line comes before the old line start, add a line
STELine newLine; STELine newLine;
newLine.offset = toOffset; newLine.offset = toOffset;
newLine.origin = ceil(curLine->origin + ascent + descent) + 1; newLine.origin = ceilf(curLine->origin + ascent + descent) + 1;
newLine.ascent = 0; newLine.ascent = 0;
fLines->InsertLine(&newLine, lineIndex); fLines->InsertLine(&newLine, lineIndex);
} else { } else {
// update the exising line // update the exising line
nextLine->offset = toOffset; nextLine->offset = toOffset;
nextLine->origin = ceil(curLine->origin + ascent + descent) + 1; nextLine->origin = ceilf(curLine->origin + ascent + descent) + 1;
// remove any lines that start before the current line // remove any lines that start before the current line
while ( lineIndex < fLines->NumLines() && while ( lineIndex < fLines->NumLines() &&
@@ -3974,7 +3974,7 @@ BTextView::UpdateScrollbars()
if (horizontalScrollBar != NULL) { if (horizontalScrollBar != NULL) {
long viewWidth = bounds.IntegerWidth(); long viewWidth = bounds.IntegerWidth();
long dataWidth = fTextRect.IntegerWidth(); long dataWidth = fTextRect.IntegerWidth();
dataWidth += (long)ceil(fTextRect.left) + 1; dataWidth += (long)ceilf(fTextRect.left) + 1;
long maxRange = dataWidth - viewWidth; long maxRange = dataWidth - viewWidth;
maxRange = max_c(maxRange, 0); maxRange = max_c(maxRange, 0);
@@ -3988,7 +3988,7 @@ BTextView::UpdateScrollbars()
if (verticalScrollBar != NULL) { if (verticalScrollBar != NULL) {
long viewHeight = bounds.IntegerHeight(); long viewHeight = bounds.IntegerHeight();
long dataHeight = fTextRect.IntegerHeight(); long dataHeight = fTextRect.IntegerHeight();
dataHeight += (long)ceil(fTextRect.top) + 1; dataHeight += (long)ceilf(fTextRect.top) + 1;
long maxRange = dataHeight - viewHeight; long maxRange = dataHeight - viewHeight;
maxRange = max_c(maxRange, 0); maxRange = max_c(maxRange, 0);