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

查看:38
本文介绍了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天全站免登陆