This commit is contained in:
Horis
2024-04-11 12:28:07 +08:00
parent b1da2ec309
commit c9ea5d2148
@@ -181,12 +181,10 @@ fun View.screenshot(picture: Picture) {
fun View.screenshot(canvasRecorder: CanvasRecorder) { fun View.screenshot(canvasRecorder: CanvasRecorder) {
if (width > 0 && height > 0) { if (width > 0 && height > 0) {
canvasRecorder.record(width, height) { canvasRecorder.record(width, height) {
withTranslation(-scrollX.toFloat(), -scrollY.toFloat()) {
draw(this) draw(this)
} }
} }
} }
}
fun View.setPaddingBottom(bottom: Int) { fun View.setPaddingBottom(bottom: Int) {
setPadding(paddingLeft, paddingTop, paddingRight, bottom) setPadding(paddingLeft, paddingTop, paddingRight, bottom)