开发者

Does iPhone support per pixel alpha?

开发者 https://www.devze.com 2023-01-22 21:55 出处:网络
I am f开发者_如何转开发inding a way to draw image with per pixel alpha using UIView on iphone, any one have tried that? This is possible. I\'m assuming you are using a UIImageView to display the image

I am f开发者_如何转开发inding a way to draw image with per pixel alpha using UIView on iphone, any one have tried that?


This is possible. I'm assuming you are using a UIImageView to display the image? Just make sure that the background colour of your view is set to clear and that Opaque is set to false.


Yes.

You can back an UIView with an RGBA bitmap of the same size where every pixel has it's own 8 bits of alpha channel.

Unless you specify otherwise (by scaling or using a transform, etc.), a generic UIView uses a CALayer backed by such a bitmap.

0

精彩评论

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