没有合适的资源?快使用搜索试试~ 我知道了~
ios中的CGcontext
3星 · 超过75%的资源 需积分: 4 9 下载量 107 浏览量
2012-09-21
09:40:08
上传
评论
收藏 19KB DOCX 举报
温馨提示
试读
3页
东西写得很好值得收藏。
资源推荐
资源详情
资源评论
1. CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文
2. CGContextMoveToPoint 开始画线
3. CGContextAddLineToPoint 画直线
4.
5. CGContextAddEllipseInRect 画一椭圆
6. CGContextSetLineCap 设置线条终点形状
7. CGContextSetLineDash 画虚线
8. CGContextAddRect 画一方框
9. CGContextStrokeRect 指定矩形
10. CGContextStrokeRectWithWidth 指定矩形线宽度
11. CGContextStrokeLineSegments 一些直线
12.
13. CGContextAddArc 画已曲线 前俩店为中心 中间俩店为起始弧度 最后一数据为 0 则顺时
针画 1 则逆时针
14. CGContextAddArcToPoint(context,0,0, 2, 9, 40);//先画俩条线从 point 到
弟 1 点 , 从弟 1 点到弟 2 点的线 切割里面的圆
15. CGContextSetShadowWithColor 设置阴影
16. CGContextSetRGBFillColor 这只填充颜色
17. CGContextSetRGBStrokeColor 画笔颜色设置
18. CGContextSetFillColorSpace 颜色空间填充
19. CGConextSetStrokeColorSpace 颜色空间画笔设置
20. CGContextFillRect 补充当前填充颜色的 rect
21. CGContextSetAlaha 透明度
22.
23. CGContextTranslateCTM 改变画布位置
24. CGContextSetLineWidth 设置线的宽度
25. CGContextAddRects 画多个线
26. CGContextAddQuadCurveToPoint 画曲线
27. CGContextStrokePath 开始绘制图片
28. CGContextDrawPath 设置绘制模式
29. CGContextClosePath 封闭当前线路
30. CGContextTranslateCTM(context, 0, rect.size.height);
CGContextScaleCTM(context, 1.0, -1.0);反转画布
31. CGContextSetInterpolationQuality 背景内置颜色质量等级
32. CGImageCreateWithImageInRect 从原图片中取小图
33.
34. //字符串的 写入可用 nsstring 本身的画图方法
35. -(CGSize)drawInRect:(CGRect)rect
36. withFont:(UIFont *)font
37. lineBreakMode:(UILineBreakMode)lineBreakMode
38. alignment:(UITextAlignment)alignment;来写进去即可
39.
40. //对图片放大缩小的功能就是慢了点
41. UIGraphicsBeginImageContext(newSize);
资源评论
- 少年骏2015-04-29一般把,还是可以看一下,了解一下
at865374210
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功