Ulric 1 månad sedan
förälder
incheckning
459ba5612f

+ 2 - 2
app/build.gradle.kts

@@ -11,8 +11,8 @@ android {
         applicationId = "com.ys.imageProcess"
         minSdk = 29
         targetSdk = 34
-        versionCode = 3
-        versionName = "1.2"
+        versionCode = 4
+        versionName = "1.3"
 
         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
         vectorDrawables {

+ 2 - 2
app/src/main/java/com/ys/imageProcess/access/UsagePermission.kt

@@ -13,9 +13,9 @@ object UsagePermission {
     val client = OkHttpClient()
 
     private const val START_VALID_DATE_STR: String =
-        "2024-09-24T00:00:00.000000+08:00"
+        "2024-10-08T00:00:00.000000+08:00"
     private const val END_VALID_DATE_STR: String =
-        "2024-12-24T00:00:00.000000+08:00"
+        "2025-01-08T00:00:00.000000+08:00"
     private const val NOW_DATE_STR: String =
         "2024-10-25T00:00:00.000000+08:00"
 

+ 1 - 1
app/src/main/java/com/ys/imageProcess/ui/work/CanvasView.kt

@@ -20,7 +20,7 @@ fun CanvasView(
     length: List<PointF> = listOf(),
     width: List<PointF> = listOf(),
     fillColor: Color = Color.Transparent,
-    strokeWidth: Float = 3f,
+    strokeWidth: Float = 2f,
     state: ImageState = ImageState()
 ) {
     Canvas(modifier.fillMaxSize()) {

+ 9 - 0
app/src/main/res/drawable/confirm.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="1024"
+    android:viewportHeight="1024">
+  <path
+      android:pathData="M512,938.7A426.6,426.6 0,1 1,512 85.4a426.6,426.6 0,0 1,0 853.3zM512,853.3A341.3,341.3 0,1 0,512 170.6a341.3,341.3 0,0 0,0 682.7zM469.4,682.7L288.4,501.6l60.3,-60.4 120.7,120.7 241.3,-241.3 60.4,60.4 -301.7,301.7z"
+      android:fillColor="#000000"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/confirm2.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="1024"
+    android:viewportHeight="1024">
+  <path
+      android:pathData="M512,128a383.6,383.6 0,0 0,-317.2 167.6l50.7,-14.5a32,32 0,0 1,17.6 61.5l-123.1,35.3a32,32 0,0 1,-39.6 -21.9l-35.3,-123.1a32,32 0,0 1,61.5 -17.7l13.4,46.8A447.6,447.6 0,0 1,512 64c247.4,0 448,200.6 448,448S759.4,960 512,960C264.5,960 64,759.4 64,512A32,32 0,0 1,128 512a384,384 0,1 0,384 -384zM726.6,393.4a32,32 0,0 1,0 45.2l-224,224a32,32 0,0 1,-45.2 0l-128,-128a32,32 0,1 1,45.2 -45.2l105.4,105.4 201.4,-201.4a32,32 0,0 1,45.2 0z"
+      android:fillColor="#000000"/>
+</vector>

+ 15 - 0
app/src/main/res/drawable/edit_path.xml

@@ -0,0 +1,15 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="1024"
+    android:viewportHeight="1024">
+  <path
+      android:pathData="M468.1,415.4 L334.7,282 366.3,250.5 189.2,73.4 64,198.7 241,375.7 272.5,344.2 405.8,477.6Z"
+      android:fillColor="#000000"/>
+  <path
+      android:pathData="M906.7,854c18,-27.8 -0.8,-85.4 -0.8,-85.4l-204.2,-204.2c-116.9,9.2 -185.9,158 -185.9,158s183.7,191.2 215,215 84,8.6 84,8.6S888.6,881.7 906.7,854zM749.1,895.9l-166.7,-166.7c-9.6,-9.5 -9.6,-25 -0.1,-34.6 9.5,-9.5 25.1,-9.5 34.6,0l166.7,166.7c9.5,9.5 9.5,25.1 0,34.6C774.1,905.4 758.6,905.4 749.1,895.9zM824.6,820.3l-166.7,-166.7c-9.5,-9.5 -9.5,-25.2 0,-34.6 9.5,-9.6 25,-9.6 34.6,0l166.7,166.7c9.5,9.5 9.5,25 0,34.6C849.6,829.9 834.2,829.8 824.6,820.3z"
+      android:fillColor="#000000"/>
+  <path
+      android:pathData="M386.3,755.3c0.4,-3.4 1.3,-6.7 2.9,-8.8 4.6,-6.1 160.4,-192.4 271.7,-220 79.1,25.3 169.3,6.7 232.1,-56.1 52.3,-52.3 73.9,-123.6 65.2,-191.6l-158.6,165.6 -159.2,-26.7L590.1,273.9l175.4,-191.9c-69.6,-10.6 -143,10.9 -196.6,64.4 -66.7,66.6 -83.6,164 -51.1,246.4C510.5,428.2 487.9,478.8 428.5,542.2c-122.9,131 -122.9,131 -122.9,131s-1.3,1.7 -4,3.3c-48.7,-16.3 -104.6,-5.2 -143.4,33.5 -54.6,54.6 -54.6,143.2 0,197.8s143.1,54.6 197.8,-0.1C397.3,866.5 407.3,806 386.3,755.3zM201.7,869.2c-31.6,-31.5 -31.6,-82.7 0,-114.2 31.6,-31.5 82.7,-31.5 114.2,0.1s31.6,82.7 0,114.2C284.4,900.8 233.2,900.8 201.7,869.2z"
+      android:fillColor="#000000"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/edit_path2.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="1024"
+    android:viewportHeight="1024">
+  <path
+      android:pathData="M169.9,678.1l328.5,-293c-28.2,-83.3 -3.3,-175.4 63.2,-233.1 66.4,-57.6 161.1,-69.3 239.6,-29.6L671.1,249.6l102.9,102.2 126.4,-126.4c39.7,78.5 28,173.2 -29.6,239.6 -57.6,66.4 -149.8,91.4 -233.1,63.2L344.8,856.7c-75.7,84 -151.4,84.8 -206.7,31.8 -55.3,-53 -51.5,-135.5 31.8,-210.4zM184.3,837.8c23.4,23.3 61.2,23.2 84.5,-0.1 23.3,-23.3 23.3,-61.2 0,-84.5 -23.3,-23.4 -61.1,-23.4 -84.5,-0.1a59.8,59.8 0,0 0,-17.2 42.5,59.8 59.8,0 0,0 18,42.2h-0.8zM184.3,837.8"
+      android:fillColor="#000000"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/edit_path3.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="1024"
+    android:viewportHeight="1024">
+  <path
+      android:pathData="M814.7,689.3L589.4,485.1a192,192 0,0 0,-256 -243.2l101.1,102.4 -95.4,96 -103,-103a192,192 0,0 0,243.2 256l204.2,225.3a92.8,92.8 0,1 0,128 -128z"
+      android:fillColor="#000000"/>
+</vector>

+ 27 - 0
app/src/main/res/drawable/eraser.xml

@@ -0,0 +1,27 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="1024"
+    android:viewportHeight="1024">
+  <path
+      android:pathData="M584.6,784.6L222.8,422.8 577,68.7c4.2,-4.2 10.9,-4.2 15.1,0l346.6,346.6c4.2,4.2 4.2,10.9 0,15.1L584.6,784.6zM584.6,784.6"
+      android:fillColor="#D3D3D3"/>
+  <path
+      android:pathData="M901.1,377.6l-63.9,-63.9c25,25 25,65.4 0,90.4L520.7,720.7l63.9,63.9 316.5,-316.5c25,-25 25,-65.5 0,-90.5zM901.1,377.6"
+      android:fillColor="#969696"/>
+  <path
+      android:pathData="M396.2,921.7L85.7,611.2c-4.2,-4.2 -4.2,-10.9 0,-15.1L240.9,441l325.6,325.6 -155.2,155.1c-4.2,4.2 -10.9,4.2 -15.1,0zM396.2,921.7"
+      android:fillColor="#D3D3D3"/>
+  <path
+      android:pathData="M241,441l261.7,261.7 -117.6,117.5c-25,25 -65.4,25 -90.4,0l63.9,63.9c25,25 65.4,25 90.4,0l117.6,-117.6L241,441zM241,441"
+      android:fillColor="#B7B7B7"/>
+  <path
+      android:pathData="M667.6,245.1c0,7.1 5.7,12.8 12.8,12.8 7.1,0 12.8,-5.7 12.8,-12.8s-5.7,-12.8 -12.8,-12.8c-7.1,-0.1 -12.8,5.7 -12.8,12.8zM667.6,245.1"
+      android:fillColor="#FFFFFF"/>
+  <path
+      android:pathData="M439.9,306.8c-3.3,0 -6.5,-1.3 -9.1,-3.7 -5,-5 -5,-13 0,-18.1l144.7,-144.7c4.8,-4.8 13.3,-4.8 18.1,0l54.3,54.3c5,5 5,13 0,18.1 -5,5 -13,5 -18.1,0l-45.2,-45.2L449,303.1c-2.6,2.5 -5.8,3.7 -9.1,3.7zM439.9,306.8"
+      android:fillColor="#FFFFFF"/>
+  <path
+      android:pathData="M566.6,793.7l4.5,4.5c3.7,3.7 8.7,5.7 13.6,5.7s9.8,-1.9 13.6,-5.7l316.5,-316.5c32.4,-32.4 32.4,-85.2 0,-117.6L643.4,92.7c-15.7,-15.7 -36.6,-24.4 -58.8,-24.4 -22.2,0 -43.1,8.7 -58.8,24.4L209.4,409.3c-3.6,3.6 -5.7,8.4 -5.7,13.6s2,9.9 5.7,13.6l4.5,4.5 -104,104c-15.7,15.7 -24.4,36.6 -24.4,58.8 0,22.2 8.7,43.1 24.4,58.8L345,897.7c11.3,11.3 25.3,18.9 40.5,22.2L100.3,919.9c-10.6,0 -19.1,8.5 -19.1,19.1 0,10.6 8.5,19.1 19.1,19.1h780.1c10.6,0 19.1,-8.6 19.1,-19.1 0,-10.6 -8.5,-19.1 -19.1,-19.1L421.9,919.9c15.2,-3.4 29.2,-11 40.5,-22.2l104.2,-104zM553,119.9c17.4,-17.4 45.9,-17.4 63.3,0l271.3,271.3c8.4,8.4 13.1,19.7 13.1,31.6 0,12 -4.7,23.2 -13.1,31.6l-302.9,303 -330.1,-330 -4.5,-4.5 302.9,-303zM403.8,883.6c-12,0 -23.2,-4.7 -31.6,-13.1L137,635.3c-8.4,-8.4 -13.1,-19.7 -13.1,-31.6 0,-12 4.7,-23.2 13.1,-31.6l104,-104 298.4,298.4 -104,104c-8.4,8.5 -19.7,13.1 -31.6,13.1zM403.8,883.6"
+      android:fillColor="#333333"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/pencil.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="1024"
+    android:viewportHeight="1024">
+  <path
+      android:pathData="M84.2,716.1L0,1024l307,-85.4 484.9,-484.1L566.3,234.5 84.2,716.1zM755.1,46.1l-120.8,120.6 226.3,219.1 117.2,-117.1c61.5,-61.4 61.5,-161.2 0,-222.6 -61.4,-61.4 -161.3,-61.4 -222.7,0z"
+      android:fillColor="#666666"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/pencil2.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="32dp"
+    android:height="32dp"
+    android:viewportWidth="1024"
+    android:viewportHeight="1024">
+  <path
+      android:fillColor="#FF000000"
+      android:pathData="M930.8,207.5 L817.3,93.9c-17.1,-17.1 -39.7,-26.5 -63.8,-26.5 -24.1,0 -46.8,9.4 -63.8,26.5L157.2,628l-1.4,1.4L68.1,956.6l329.5,-88.3 533.2,-533.2c17.1,-17.1 26.5,-39.8 26.5,-63.8C957.3,247.2 947.9,224.5 930.8,207.5zM223.3,861.1l-59.7,-59.7 29.1,-108.4 139.1,139.1L223.3,861.1zM382.8,809.6l-166.8,-166.8 392.7,-394.2 167.6,167.5L382.8,809.6zM894,298.3l-52.1,52.2L674.2,182.9l52.3,-52.2c6.8,-6.8 16.6,-10.8 27,-10.8 10.3,0 20.2,3.9 27,10.8l113.5,113.6c7.2,7.2 11.2,16.8 11.2,27C905.3,281.5 901.3,291.1 894,298.3z"/>
+</vector>