小编use*_*890的帖子

核心图形旋转矩形

通过这个公式,我得到了角度

double rotateAngle = atan2(y,x)
Run Code Online (Sandbox Code Playgroud)

使用此代码我可以绘制一个矩形

CGRect rect = CGRectMake(x,y , width ,height);
CGContextAddRect(context, rect);
CGContextStrokePath(context);
Run Code Online (Sandbox Code Playgroud)

如何围绕角度旋转矩形?

core-graphics rotation ios

7
推荐指数
1
解决办法
4753
查看次数

标签 统计

core-graphics ×1

ios ×1

rotation ×1