小编Dom*_*lin的帖子

cgcontext旋转矩形

伙计们!我需要将一些图像绘制到CGContext.这是相关的代码:

CGContextSaveGState(UIGraphicsGetCurrentContext());

CGContextRef ctx = UIGraphicsGetCurrentContext();

CGRect rect = r;

CGContextRotateCTM(ctx, DEGREES_TO_RADIANS(350));
[image drawInRect:r];


CGContextRestoreGState(UIGraphicsGetCurrentContext());
Run Code Online (Sandbox Code Playgroud)

实际上,矩形是旋转并显示在一个不是我的目的的区域.我只想旋转图像并显示在同一位置.有任何想法吗 ?????

core-graphics rotation rect cgcontext ios

3
推荐指数
1
解决办法
6671
查看次数

标签 统计

cgcontext ×1

core-graphics ×1

ios ×1

rect ×1

rotation ×1