From 7788045115ac9a102ab47d54eb54dae026e9f4e3 Mon Sep 17 00:00:00 2001 From: Vasyl Melnyk Date: Wed, 14 Jun 2023 14:55:56 +0300 Subject: [PATCH] Updated RSBlurShadow.kt rounded corners draw. --- .../gigamole/composeshadowsplus/rsblur/RSBlurShadow.kt | 10 +++------- README.md | 2 +- plugins/src/main/java/ProjectConfig.kt | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ComposeShadowsPlus/src/main/kotlin/com/gigamole/composeshadowsplus/rsblur/RSBlurShadow.kt b/ComposeShadowsPlus/src/main/kotlin/com/gigamole/composeshadowsplus/rsblur/RSBlurShadow.kt index 351331f..435b6d5 100644 --- a/ComposeShadowsPlus/src/main/kotlin/com/gigamole/composeshadowsplus/rsblur/RSBlurShadow.kt +++ b/ComposeShadowsPlus/src/main/kotlin/com/gigamole/composeshadowsplus/rsblur/RSBlurShadow.kt @@ -22,6 +22,7 @@ import androidx.compose.ui.geometry.center import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Outline import androidx.compose.ui.graphics.Paint +import androidx.compose.ui.graphics.Path import androidx.compose.ui.graphics.Shape import androidx.compose.ui.graphics.asAndroidPath import androidx.compose.ui.graphics.drawscope.drawIntoCanvas @@ -179,13 +180,8 @@ fun Modifier.rsBlurShadow( ) } is Outline.Rounded -> { - canvas.drawRoundRect( - outline.roundRect.left, - outline.roundRect.top, - outline.roundRect.right, - outline.roundRect.bottom, - outline.roundRect.bottomLeftCornerRadius.x, - outline.roundRect.bottomLeftCornerRadius.y, + drawPath( + Path().apply { addRoundRect(outline.roundRect) }.asAndroidPath(), paint ) } diff --git a/README.md b/README.md index f96a752..1e889e7 100644 --- a/README.md +++ b/README.md @@ -107,4 +107,4 @@ Created at [intive](https://intive.com). [Basil Miller](https://www.linkedin.com/in/gigamole/) [gigamole53@gmail.com](mailto:gigamole53@gmail.com) -[![](/media/footer.png)](https://intive.com/careers) \ No newline at end of file +[![](/media/footer.png)](https://intive.com/careers) diff --git a/plugins/src/main/java/ProjectConfig.kt b/plugins/src/main/java/ProjectConfig.kt index a892a89..7297ac4 100644 --- a/plugins/src/main/java/ProjectConfig.kt +++ b/plugins/src/main/java/ProjectConfig.kt @@ -5,7 +5,7 @@ import org.gradle.jvm.toolchain.JavaLanguageVersion object ProjectConfig { const val versionCode = 1 - const val versionName = "1.0.0" + const val versionName = "1.0.1" const val namespace = "com.gigamole.composeshadowsplus" const val group = "com.github.GIGAMOLE"