feat: 优化代码

pull/133/head
kunfei 5 years ago
parent 610c18e7db
commit 656fe45efb
  1. 10
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt

@ -1,8 +1,6 @@
package io.legado.app.ui.book.read.page.delegate
import android.graphics.*
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.GradientDrawable
import android.os.Build
import io.legado.app.help.ReadBookConfig
@ -271,13 +269,7 @@ class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageVi
mMatrix.setValues(mMatrixArray)
mMatrix.preTranslate(-mBezierControl1.x, -mBezierControl1.y)
mMatrix.postTranslate(mBezierControl1.x, mBezierControl1.y)
ReadBookConfig.bg?.let {
if (it is BitmapDrawable) {
canvas.drawBitmap(it.bitmap, 0f, 0f, mPaint)
} else if (it is ColorDrawable) {
canvas.drawColor(it.color)
}
}
canvas.drawColor(ReadBookConfig.bgMeanColor)
canvas.drawBitmap(bitmap, mMatrix, mPaint)
mPaint.colorFilter = null
canvas.rotate(mDegrees, mBezierStart1.x, mBezierStart1.y)

Loading…
Cancel
Save