mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
92d6e00ab0
commit
2c75182a9f
@ -1,5 +1,6 @@
|
|||||||
package io.legado.app.ui.book.read.page.entities
|
package io.legado.app.ui.book.read.page.entities
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.graphics.Canvas
|
import android.graphics.Canvas
|
||||||
import android.graphics.Paint.FontMetrics
|
import android.graphics.Paint.FontMetrics
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
@ -157,6 +158,7 @@ data class TextLine(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NewApi")
|
||||||
private fun fastDrawTextLine(view: ContentTextView, canvas: Canvas) {
|
private fun fastDrawTextLine(view: ContentTextView, canvas: Canvas) {
|
||||||
val textPaint = if (isTitle) {
|
val textPaint = if (isTitle) {
|
||||||
ChapterProvider.titlePaint
|
ChapterProvider.titlePaint
|
||||||
@ -174,7 +176,7 @@ data class TextLine(
|
|||||||
paint.letterSpacing += extraLetterSpacing
|
paint.letterSpacing += extraLetterSpacing
|
||||||
}
|
}
|
||||||
if (wordSpacing != 0f) {
|
if (wordSpacing != 0f) {
|
||||||
paint.wordSpacing += wordSpacing
|
paint.wordSpacing = wordSpacing
|
||||||
}
|
}
|
||||||
if (paint.color != textColor) {
|
if (paint.color != textColor) {
|
||||||
paint.color = textColor
|
paint.color = textColor
|
||||||
|
Loading…
Reference in New Issue
Block a user