CTM transforms vs Affine Transforms in iOS (for translate, rotate, scale)
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/Transforms.html
https://developer.apple.com/library/ios/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_affine/dq_affine.html#//apple_ref/doc/uid/TP30001066-CH204-SW1
CTM is a current transformation matrix and the CTM methods will make operations on the current matrix.
The other version of functions will make the transformation on a given matrix which means you need to specify which matrix you are trying to transform. After you did so you may apply the transform to the CTM any way you want or use it for any other purpose.
For instance these 2 operations would be the same:
CGContextTranslateCTM(context, 10, 10);
Affine:
CGAffineTransform transform = CGAffineTransformIdentity;transform = CGAffineTransformTranslate(transform, 10, 10);CGContextConcatCTM(context, transform);
As you can see the first one is more or less just a convenience so you do not need to write so much code.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
C 언어로 2차원 배열을 간략하게 파악한 분C 언어로 2차원 배열에 대한 이해와 작성을 하고 싶다. ↓이런 것 행이 있고, 열이 있고, 세로에도 가로에도 값이 넣어지는 표. 어쩌면. 포인터, malloc (말록)이 나오지만, 가볍게 흘리는 기분으로 괜찮습니다...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.