[help]IOS CoreGraphics下的CGAffineTransForm 的一个问题

ipoolo 发布于 2014年08月06日
无人欣赏。

CGAffineTransformIsIdentity

Checks whether an affine transform is the identity transform.

不是很懂这个CGAffineTransformIsIdentity 是什么意思

https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/Reference/reference.html#//apple_ref/c/func/CGAffineTransformIsIdentity

共5条回复
tinyfool 回复于 2014年08月06日

@sycx

ruandao 回复于 2014年08月06日

应该就是 未做未变换时的默认值

sycx 回复于 2014年08月06日

CGAffineTransformIsIdentity()是用来判断一个transform是不是等于CGAffineTransformIdentity

至于什么是CGAffineTransformIdentity,你得稍微了解下Matrix,也就是矩阵。

你可以这么理解, Identity相当于基本运算里的数字 1

对于一个任意一个数字x, 会有等式 x * 1 = x

对于矩阵m来说, 会有等式 m * Identity = m

相关资料:

djchen 回复于 2014年08月06日

如果你学习过opengl应该会了解,任何矩阵与identity矩阵相乘得到的结果仍然为原矩阵
在core graphics当中的含义也一样,transform的根本实际上就是矩阵的计算,identity表示没有应用过任何的变换(包括rotation 和translation).

ipoolo 回复于 2014年08月07日

@ruandao @sycx @dichen 谢谢各位~

登录 或者 注册
相关帖子