diff --git a/gallery/build.properties b/gallery/build.properties index 0ba89d7..ca4a756 100644 --- a/gallery/build.properties +++ b/gallery/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Tue Apr 28 17:21:55 HKT 2026 +#Tue Apr 28 18:27:43 CST 2026 stageCount=10 libraryProject= baseVersion=15.0 publishVersion=15.0.9 -buildCount=0 +buildCount=3 baseBetaVersion=15.0.10 diff --git a/gallery/src/main/java/cc/winboll/studio/gallery/CropActivity.java b/gallery/src/main/java/cc/winboll/studio/gallery/CropActivity.java index 8f3f14d..e160c67 100644 --- a/gallery/src/main/java/cc/winboll/studio/gallery/CropActivity.java +++ b/gallery/src/main/java/cc/winboll/studio/gallery/CropActivity.java @@ -127,6 +127,7 @@ public class CropActivity extends AppCompatActivity { public void onColorPicked(int color) { int pickX = cropCanvasView.getLastPickImageX(); int pickY = cropCanvasView.getLastPickImageY(); + colorView.setBackgroundColor(color); Toast.makeText(CropActivity.this, "颜色已拾取: #" + String.format("%06X", color & 0xFFFFFF) + " (" + pickX + "," + pickY + ")", diff --git a/gallery/src/main/java/cc/winboll/studio/gallery/CropCanvasView.java b/gallery/src/main/java/cc/winboll/studio/gallery/CropCanvasView.java index ff35972..4a39fff 100644 --- a/gallery/src/main/java/cc/winboll/studio/gallery/CropCanvasView.java +++ b/gallery/src/main/java/cc/winboll/studio/gallery/CropCanvasView.java @@ -528,10 +528,19 @@ public class CropCanvasView extends View { return true; } if (event.getAction() == MotionEvent.ACTION_UP) { - if (previewColor != 0 && previewColor != Color.TRANSPARENT) { - backgroundColor = previewColor; + if (canvasBounds.contains(x, y)) { + int pickedColor; + float imgX = screenToImageX(x); + float imgY = screenToImageY(y); + if (imageBounds.contains(imgX, imgY)) { + int colorAtPoint = getImageColorAt(x, y); + pickedColor = colorAtPoint; + backgroundColor = colorAtPoint; + } else { + pickedColor = backgroundColor; + } if (colorPickedListener != null) { - colorPickedListener.onColorPicked(backgroundColor); + colorPickedListener.onColorPicked(pickedColor); } } if (colorPickEndListener != null) {