문제

I draw a graphical primitives using functions ccDraw... and I need to calc for example a scale and transition using 3x3 matrices.

How to solve this issue in cocos2d? I can't simply use sprites/nodes because all the calculated points belong to the same object. Is it possible without converting CGPoint->matrix->CGPoint?

도움이 되었습니까?

해결책

It sounds like you are trying to do scale/rotation on the CGPoints. You can do this using CGAffineTransform functions and structure that are part of Quartz 2D.

See these references:

  1. Apple's Documents.
  2. A single example of rotating a rectangle formed by four points.
  3. SO Example(s).

Was this helpful?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top