什么是“失准图像”在iPhone操作系统的核心动画? [英] What is an "misaligned image" in terms of Core Animation in iPhone OS?

查看:93
本文介绍了什么是“失准图像”在iPhone操作系统的核心动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

乐器告诉我们有由核心动画动画的失准图像。这是什么意思?

Instruments tells that there are "misaligned images" which are animated by core animation. What does that mean?

更新:我在Instruments.app> Core Animation中看到过。

UPDATE: I've seen that in Instruments.app > Core Animation.

推荐答案

我想知道你在哪里看到这个,但我的怀疑是,它指的是一个不是像素对齐的图像。 Quartz允许你在分数像素绘制(回忆起CGPoint采取CGFloats,而不是NSIntegers),但它更昂贵,并往往创造一点模糊。你不能真正绘制一个分数像素,所以Quartz必须做反锯齿拉断。这需要时间,当然会伤害核心动画的性能。

I'd love more information about where you're seeing this, but my suspicion is that it's referring to an image that is not pixel-aligned. Quartz allows you to draw at fractional pixels (recall that CGPoint takes CGFloats, not NSIntegers), but it's more expensive and tends to create a bit of blurriness. You can't really draw on a fractional pixel, so Quartz has to do anti-aliasing to pull it off. That takes time and certainly would hurt Core Animation performance.

Quartz不会警告你,你画的是分数像素,它是特别不喜欢的文本。所以这是你需要考虑的任何时候你正在做程序化布局。

Quartz will not warn you that you're drawing on fractional pixels, and it's particularly unkind to text. So it's something you need to think about any time you're doing programmatic layout.

这篇关于什么是“失准图像”在iPhone操作系统的核心动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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