本文主要记录CGAffineTransform方法类的大概使用方式
//移动效果
CGAffineTransform CGAffineTransformMakeTranslation (CGFloat tx, CGFloat ty);
CGAffineTransform CGAffineTransformTranslate ( CGAffineTransform t, CGFloat tx, CGFloat ty);
//旋转效果
CGAffineTransform CGAffineTransformMakeRotation (CGFloat angle);
CGAffineTransform CGAffineTransformRotate (CGAffineTransform t, CGFloat angle);
//缩放效果
CGAffineTransform CGAffineTransformMakeScale (CGFloat sx, CGFloat sy);
CGAffineTransform CGAffineTransformScale (CGAffineTransform t, CGFloat sx, CGFloat sy);
//反转效果
CGAffineTransform CGAffineTransformInvert (CGAffineTransform t);
//只对局部产生效果
CGRect CGRectApplyAffineTransform (CGRect rect, CGAffineTransform t);
//判断两个AffineTrans是否相等
bool CGAffineTransformEqualToTransform (CGAffineTransform t1, CGAffineTransform t2);
//获得Affine Transform
CGAffineTransform CGContextGetUserSpaceToDeviceSpaceTransform (CGContextRef c);
//下面的函数只起到查看的效果,比如看一下这个用户空间的点,转换到设备空间去坐标是多少
CGPoint CGContextConvertPointToDeviceSpace (CGContextRef c, CGPoint point);
CGPoint CGContextConvertPointToUserSpace (CGContextRef c, CGPoint point);
CGSize CGContextConvertSizeToDeviceSpace (CGContextRef c, CGSize size);
CGSize CGContextConvertSizeToUserSpace (CGContextRef c, CGSize size);
CGRect CGContextConvertRectToDeviceSpace (CGContextRef c, CGRect rect);
CGRect CGContextConvertRectToUserSpace (CGContextRef c, CGRect rect);
//合并 将两个仿射合并成一个仿射效果
// CGAffineTransform AffineTransform1 = CGAffineTransformMakeScale(0.5,0.5);
CGAffineTransform AffineTransform1 = CGAffineTransformScale(imgview.transform,0.8,0.8);
CGAffineTransform AffineTransform2 = CGAffineTransformMakeRotation(M_PI/4);
CGAffineTransform AffineTransform3 = CGAffineTransformConcat(AffineTransform1,AffineTransform2);
CGAffineTransform AffineTransform4 = CGAffineTransformMake(0, 1, 1, 1, 1, 0);
imgview.transform = CGAffineTransformConcat(AffineTransform3,AffineTransform4);