开发者

Image is duplicated using setShadowLayer() in Android

开发者 https://www.devze.com 2023-02-25 06:04 出处:网络
I\'m using the method \"setShadowLayer\" of the class \"Paint\" on Andro开发者_开发百科id to apply a shadow effect on a Bitmap image. However, instead of creating the shadow effect, the image is dupli

I'm using the method "setShadowLayer" of the class "Paint" on Andro开发者_开发百科id to apply a shadow effect on a Bitmap image. However, instead of creating the shadow effect, the image is duplicated.

Does anyone know why this happens?

Thanks!


Just increase radius of it and it will give shadow effect:

mPaint.setShadowLayer(5, getWidth(), getHeight()-2, Color.BLUE);

here 5 is my radius.

0

精彩评论

暂无评论...
验证码 换一张
取 消