优化
This commit is contained in:
@@ -23,8 +23,8 @@ fun CanvasRecorder.recordIfNeeded(view: View): Boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline fun CanvasRecorder.record(width: Int, height: Int, block: Canvas.() -> Unit) {
|
inline fun CanvasRecorder.record(width: Int, height: Int, block: Canvas.() -> Unit) {
|
||||||
try {
|
|
||||||
val canvas = beginRecording(width, height)
|
val canvas = beginRecording(width, height)
|
||||||
|
try {
|
||||||
canvas.withSave {
|
canvas.withSave {
|
||||||
block()
|
block()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user