iPhone:CALayer的+旋转3D +反锯齿? [英] iPhone: CALayer + rotate in 3D + antialias?

查看:315
本文介绍了iPhone:CALayer的+旋转3D +反锯齿?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是iPhone SDK的问题:我在屏幕上画一个UIImageView。我在3D旋转,并提供了一​​个有点角度的,所以图像看起来像它的一端指向屏幕以一定的角度。这一切工作正常。现在的问题是似乎所得到的图像的边缘不被在所有抗锯齿。任何人都知道如何使它如此?

An iPhone SDK question: I'm drawing a UIImageView on the screen. I've rotated it in 3D and provided a bit of perspective, so the image looks like it's pointing into the screen at an angle. That all works fine. Now the problem is the edges of the resulting picture don't seem to be antialiased at all. Anybody know how to make it so?

从本质上讲,我用石英3D转换尽我实现我自己的版本的CoverFlow(是啊是啊,外观设计专利等等等等)的。它工作正常,除了每个盖未抗锯齿,和苹果版本。

Essentially, I'm implementing my own version of CoverFlow (yeah yeah, design patent blah blah) using quartz 3d transformations to do everything. It works fine, except that each cover isn't antialiased, and Apples version is.

我已经试过搞乱与周围的CALayer的的edgeAntialisingMask,但是这并没有帮助 - 默认值是每边应抗锯齿...

I've tried messing around with the edgeAntialisingMask of the CALayer, but that didn't help - the defaults are that every edge should be antialiased...

谢谢!

推荐答案

您可以尝试添加围绕图像的边缘部分透明的像素,无论是把UIImageView的一个稍大空的观点,即应用旋转,或更改源图像。

You could try adding some transparent pixels around the edge of the image, either by putting the UIImageView in a slightly larger empty view that you apply rotation to, or by changing the source images.

这篇关于iPhone:CALayer的+旋转3D +反锯齿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆