优化
This commit is contained in:
1 parent
8e8666200e
commit
02bde4841d
1 file changed
+22
-3
@@ -182,7 +182,7 @@ object ChapterProvider {
|
||||
}
|
||||
durY = setTypeImage(
|
||||
book, matcher.group(1)!!,
|
||||
absStartX, durY, textPages, book.getImageStyle()
|
||||
absStartX, durY, textPages, stringBuilder, book.getImageStyle()
|
||||
)
|
||||
start = matcher.end()
|
||||
}
|
||||
@@ -232,13 +232,17 @@ object ChapterProvider {
|
||||
x: Int,
|
||||
y: Float,
|
||||
textPages: ArrayList<TextPage>,
|
||||
stringBuilder: StringBuilder,
|
||||
imageStyle: String?,
|
||||
): Float {
|
||||
var durY = y
|
||||
val size = ImageProvider.getImageSize(book, src, ReadBook.bookSource)
|
||||
if (size.width > 0 && size.height > 0) {
|
||||
if (durY > visibleHeight) {
|
||||
textPages.last().height = durY
|
||||
val textPage = textPages.last()
|
||||
textPage.height = durY
|
||||
textPage.text = stringBuilder.toString()
|
||||