From 3273b0c4bea83b910536199647c1968bd7a478bc Mon Sep 17 00:00:00 2001 From: Tianscar Date: Thu, 1 Jul 2021 22:37:45 +0800 Subject: [PATCH] Bug fix --- app/build.gradle | 4 ++-- .../ansdoship/pixelarteditor/MainActivity.java | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2e70ce6..e2badff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,8 +23,8 @@ android { applicationId "com.ansdoship.pixelarteditor" minSdkVersion 16 targetSdkVersion 30 - versionCode 17 - versionName "0.0.3.7-beta" + versionCode 18 + versionName "0.0.3.8-beta" vectorDrawables { useSupportLibrary = true } diff --git a/app/src/main/java/com/ansdoship/pixelarteditor/MainActivity.java b/app/src/main/java/com/ansdoship/pixelarteditor/MainActivity.java index c430ae7..e603219 100644 --- a/app/src/main/java/com/ansdoship/pixelarteditor/MainActivity.java +++ b/app/src/main/java/com/ansdoship/pixelarteditor/MainActivity.java @@ -105,7 +105,6 @@ import com.tianscar.androidutils.ColorFactory; import com.tianscar.androidutils.EnvironmentUtils; import com.tianscar.androidutils.MathUtils; -import com.tianscar.androidutils.ScreenUtils; import com.tianscar.simplebitmap.BitmapDecoder; import com.tianscar.simplebitmap.BitmapEncoder; import com.tianscar.simplebitmap.BitmapUtils; @@ -330,6 +329,18 @@ public void run() { flushPaint(listPalettes.getCheckedPaletteColor()); + switch (toolFlag) { + case ToolFlag.PAINT: + case ToolFlag.ERASER: + setStrokeCap(Paint.Cap.ROUND); + setStrokeJoin(Paint.Join.ROUND); + break; + case ToolFlag.SHAPE: + setStrokeCap(Paint.Cap.SQUARE); + setStrokeJoin(Paint.Join.MITER); + break; + } + } private void saveData() { @@ -429,8 +440,8 @@ private int IMAGE_TO_CENTER_Y_DEFAULT() { public final static int IMAGE_WIDTH_MIN = 1; public final static int IMAGE_HEIGHT_MIN = 1; - public final static int IMAGE_WIDTH_MAX = 2048; - public final static int IMAGE_HEIGHT_MAX = 2048; + public final static int IMAGE_WIDTH_MAX = 1024; + public final static int IMAGE_HEIGHT_MAX = 1024; public static int TEXT_SIZE_INTEGER() { return ApplicationUtils.getResources().getInteger(R.integer.text_size_integer);