cocos2d-x节点(CCAffineTransform.h)API

本文来自http://blog.csdn.net/runaying ,引用必须注明出处!

cocos2d-x节点(CCAffineTransform.h)API

温馨提醒:为了大家能更好学习,强烈推荐大家看看本人的这篇博客 Cocos2d-X权威指南笔记

///\cocos2d-x-3.0alpha0\cocos2dx\cocoa
//仿射变换方法的定义

#ifndef __COCOA_CGAFFINETRANSFORM_H__
#define __COCOA_CGAFFINETRANSFORM_H__

#include "CCGeometry.h"
#include "platform/CCPlatformMacros.h"

NS_CC_BEGIN

struct AffineTransform {
    float a, b, c, d;
    float tx, ty;

    static const AffineTransform IDENTITY;
};

CC_DLL AffineTransform __CCAffineTransformMake(float a, float b, float c, float d, float tx, float ty);
#define AffineTransformMake __CCAffineTransformMake

CC_DLL Point __CCPointApplyAffineTransform(const Point& point, const AffineTransform& t);
#define PointApplyAffineTransform __CCPointApplyAffineTransform

CC_DLL Size __CCSizeApplyAffineTransform(const Size& size, const AffineTransform& t);
#define SizeApplyAffineTransform __CCSizeApplyAffineTransform

CC_DLL AffineTransform AffineTransformMakeIdentity();
CC_DLL Rect RectApplyAffineTransform(const Rect& rect, const AffineTransform& anAffineTransform);

CC_DLL AffineTransform AffineTransformTranslate(const AffineTransform& t, float tx, float ty);
CC_DLL AffineTransform AffineTransformRotate(const AffineTransform& aTransform, float anAngle);
CC_DLL AffineTransform AffineTransformScale(const AffineTransform& t, float sx, float sy);
CC_DLL AffineTransform AffineTransformConcat(const AffineTransform& t1, const AffineTransform& t2);
CC_DLL bool AffineTransformEqualToTransform(const AffineTransform& t1, const AffineTransform& t2);
CC_DLL AffineTransform AffineTransformInvert(const AffineTransform& t);

extern CC_DLL const AffineTransform AffineTransformIdentity;

NS_CC_END

#endif // __COCOA_CGAFFINETRANSFORM_H__


你可能感兴趣的:(cocos2d,cocos2dx,cocos2d-x)