|
|
@ -61,13 +61,7 @@ object ChapterProvider { |
|
|
|
val title = surplusText.substring(0, end) |
|
|
|
val title = surplusText.substring(0, end) |
|
|
|
surplusText = surplusText.substring(end + 1) |
|
|
|
surplusText = surplusText.substring(end + 1) |
|
|
|
durY = setTypeText( |
|
|
|
durY = setTypeText( |
|
|
|
title, |
|
|
|
title, durY, textPages, pageLines, pageLengths, stringBuilder, true |
|
|
|
durY, |
|
|
|
|
|
|
|
textPages, |
|
|
|
|
|
|
|
pageLines, |
|
|
|
|
|
|
|
pageLengths, |
|
|
|
|
|
|
|
stringBuilder, |
|
|
|
|
|
|
|
true |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -145,9 +139,9 @@ object ChapterProvider { |
|
|
|
textPages.add(TextPage()) |
|
|
|
textPages.add(TextPage()) |
|
|
|
textPages.last().textLines.add(textLine) |
|
|
|
textPages.last().textLines.add(textLine) |
|
|
|
} |
|
|
|
} |
|
|
|
textLine.lineTop = paddingTop + durY - textPaint.textHeight |
|
|
|
textLine.lineBottom = paddingTop + durY - lineSpacingExtra |
|
|
|
textLine.lineBase = paddingTop + durY - textPaint.fontMetrics.descent |
|
|
|
textLine.lineBase = textLine.lineBottom - textPaint.fontMetrics.descent |
|
|
|
textLine.lineBottom = paddingTop + durY |
|
|
|
textLine.lineTop = textLine.lineBottom - textPaint.textHeight |
|
|
|
val words = |
|
|
|
val words = |
|
|
|
text.substring(layout.getLineStart(lineIndex), layout.getLineEnd(lineIndex)) |
|
|
|
text.substring(layout.getLineStart(lineIndex), layout.getLineEnd(lineIndex)) |
|
|
|
stringBuilder.append(words) |
|
|
|
stringBuilder.append(words) |
|
|
|