| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkTextBox.h" | 8 #include "SkTextBox.h" |
| 9 #include "SkUtils.h" | 9 #include "SkUtils.h" |
| 10 | 10 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 } | 250 } |
| 251 | 251 |
| 252 int SkTextBox::countLines() const { | 252 int SkTextBox::countLines() const { |
| 253 return SkTextLineBreaker::CountLines(fText, fLen, *fPaint, fBox.width()); | 253 return SkTextLineBreaker::CountLines(fText, fLen, *fPaint, fBox.width()); |
| 254 } | 254 } |
| 255 | 255 |
| 256 SkScalar SkTextBox::getTextHeight() const { | 256 SkScalar SkTextBox::getTextHeight() const { |
| 257 SkScalar spacing = SkScalarMul(fPaint->getTextSize(), fSpacingMul) + fSpacin
gAdd; | 257 SkScalar spacing = SkScalarMul(fPaint->getTextSize(), fSpacingMul) + fSpacin
gAdd; |
| 258 return this->countLines() * spacing; | 258 return this->countLines() * spacing; |
| 259 } | 259 } |
| OLD | NEW |