From a355361f33a3722c62ac2545f4955dab738a94cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B6=9B?= Date: Wed, 11 Nov 2020 17:31:37 +0800 Subject: [PATCH] fix:Android shadow setAntiAlias false --- .../src/main/java/pub/doric/shader/DoricLayer.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doric-android/doric/src/main/java/pub/doric/shader/DoricLayer.java b/doric-android/doric/src/main/java/pub/doric/shader/DoricLayer.java index 6da46ddd..98a817a0 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/DoricLayer.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/DoricLayer.java @@ -22,16 +22,15 @@ import android.graphics.Path; import android.graphics.RectF; import android.graphics.Region; import android.os.Build; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.annotation.RequiresApi; - import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; + /** * @Description: com.github.penfeizhou.doric.shader * @Author: pengfei.zhou @@ -117,7 +116,7 @@ public class DoricLayer extends FrameLayout { public void setShadow(int sdColor, int sdOpacity, int sdRadius, int offsetX, int offsetY) { if (mShadowPaint == null) { mShadowPaint = new Paint(); - mShadowPaint.setAntiAlias(true); + mShadowPaint.setAntiAlias(false); mShadowPaint.setStyle(Paint.Style.FILL); } mShadowPaint.setColor(sdColor);