简体   繁体   English

android:如何创建类似photoshop的叠加融合?

[英]android: How to create overlay blend like photoshop?

I am tring achive overlay blend (like photoshop)in my android application. 我在我的android应用程序中实现achive叠加融合(如photoshop)。 I have tried differnt PorterDuff.Modes (ie SCREEN, MYLTIPLY etc) with differnt combinations but could not achive the perfect overlay effect. 我尝试过使用不同的组合使用不同的PorterDuff.Modes(即SCREEN,MYLTIPLY等),但无法达到完美的叠加效果。 Is there a way to achive effect? 有没有达到效果的方法?

You can use PorterDuff overlay Mode as i shown below. 您可以使用PorterDuff覆盖模式,如下所示。 It will work on the API level 11 or higher. 它将在API级别11或更高版本上工作。

 Compose.setXfermode(new android.graphics.PorterDuffXfermode(Mode.OVERLAY));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM