質問

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