Giter Club home page Giter Club logo

Comments (2)

HMZhhh avatar HMZhhh commented on July 20, 2024

我直接 在draw 的paint 增加属性 alpha(122),阴影是柔和了 但是 会影响本身的视图,刚看没多久代码,我是有一点疑问,为什么您要设置在布局内作管理 而不是单纯给单一控件添加即可。。。

from ashadow2.

Mosect avatar Mosect commented on July 20, 2024

你好,将ShadowColor设置成带有透明度颜色即可,比如:#80000000;使用内存的原因是因为内部使用了bitmap暂存阴影效果,如果每个视图都独自使用,则可能会非常消耗内存。大部分项目,阴影都是一样的,因此做缓存进行复用非常值得。其实可以不用bitmap先缓存阴影效果,可以直接缓存,但那样就会出现很大的性能消耗。并且view必须关闭硬件加速才行。综合以上,采用了bitmap缓存加上bitmap公用(其实是.9图) @HMZhhh

from ashadow2.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.