fix:Android shadow setAntiAlias false

This commit is contained in:
刘涛 2020-11-11 17:31:37 +08:00 committed by osborn
parent 760ae8d26f
commit a355361f33

View File

@ -22,16 +22,15 @@ import android.graphics.Path;
import android.graphics.RectF; import android.graphics.RectF;
import android.graphics.Region; import android.graphics.Region;
import android.os.Build; import android.os.Build;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
/** /**
* @Description: com.github.penfeizhou.doric.shader * @Description: com.github.penfeizhou.doric.shader
* @Author: pengfei.zhou * @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) { public void setShadow(int sdColor, int sdOpacity, int sdRadius, int offsetX, int offsetY) {
if (mShadowPaint == null) { if (mShadowPaint == null) {
mShadowPaint = new Paint(); mShadowPaint = new Paint();
mShadowPaint.setAntiAlias(true); mShadowPaint.setAntiAlias(false);
mShadowPaint.setStyle(Paint.Style.FILL); mShadowPaint.setStyle(Paint.Style.FILL);
} }
mShadowPaint.setColor(sdColor); mShadowPaint.setColor(sdColor);