1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 10:49:24 +02:00
This commit is contained in:
Nikolay Pultsin 2011-07-02 11:57:05 +01:00
parent 187aefe725
commit cf3c2701dd

View file

@ -136,12 +136,12 @@ abstract class ZLTextViewBase extends ZLView {
} }
final int getElementDescent(ZLTextElement element) { final int getElementDescent(ZLTextElement element) {
return (element instanceof ZLTextWord) ? myContext.getDescent() : 0; return element instanceof ZLTextWord ? myContext.getDescent() : 0;
} }
final int getWordWidth(ZLTextWord word, int start) { final int getWordWidth(ZLTextWord word, int start) {
return return
(start == 0) ? start == 0 ?
word.getWidth(myContext) : word.getWidth(myContext) :
myContext.getStringWidth(word.Data, word.Offset + start, word.Length - start); myContext.getStringWidth(word.Data, word.Offset + start, word.Length - start);
} }