From 349ca36d4e6eee04a75e436f091feb280346f864 Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Mon, 5 May 2025 19:18:35 +0800 Subject: [PATCH] [skip ci]: Remove unnecessary center point calculation code to simplify bitmap transformation logic --- .../src/main/java/com/sukisu/ultra/ui/util/BackgroundUtils.kt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/manager/app/src/main/java/com/sukisu/ultra/ui/util/BackgroundUtils.kt b/manager/app/src/main/java/com/sukisu/ultra/ui/util/BackgroundUtils.kt index 481e6dfa..498d49d4 100644 --- a/manager/app/src/main/java/com/sukisu/ultra/ui/util/BackgroundUtils.kt +++ b/manager/app/src/main/java/com/sukisu/ultra/ui/util/BackgroundUtils.kt @@ -63,10 +63,6 @@ fun Context.applyTransformationToBitmap(bitmap: Bitmap, transformation: Backgrou val safeScale = maxOf(0.1f, transformation.scale) matrix.postScale(safeScale, safeScale) - // 计算中心点 - val centerX = targetWidth / 2f - val centerY = targetHeight / 2f - // 计算偏移量,确保不会出现负最大值的问题 val widthDiff = (bitmap.width * safeScale - targetWidth) val heightDiff = (bitmap.height * safeScale - targetHeight)