iPhone:CALayer的+旋转3D +反锯齿?反锯齿、iPhone、CALayer

由网友(余欢)分享简介:这是iPhone SDK的问题:我在屏幕上画一个UIImageView。我在3D旋转,并提供了一​​个有点角度的,所以图像看起来像它的一端指向屏幕以一定的角度。这一切工作正常。现在的问题是似乎所得到的图像的边缘不被在所有抗锯齿。任何人都知道如何使它如此?An iPhone SDK question: I'm draw...

这是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.

阅读全文

相关推荐

最新文章