随笔分类 -  Quartz2D

7. Quartz2D 绘制水印
摘要:#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; UIImage *i... 阅读全文

posted @ 2015-02-17 19:49 雾里寻梦 阅读(137) 评论(0) 推荐(0)

6. Quartz2D 随机绘制N个五角星
摘要:#import "MyView.h"#pragma mark - 记录五角星5个顶点CGPoint points[5];@interface MyView(){ //判断是否已经计算过顶点 BOOL _hasPoint;}@end@implementation MyView-(void)... 阅读全文

posted @ 2015-02-17 12:39 雾里寻梦 阅读(226) 评论(0) 推荐(0)

5. Quartz2D 绘制图像
摘要:#pragma mark 绘制图像-(void)drawImage:(CGContextRef)context{ UIImage *image = [UIImage imageNamed:@"1.png"]; //提示:绘制之后,就无法改变位置,也没有办法监听手势 ... 阅读全文

posted @ 2015-02-17 12:37 雾里寻梦 阅读(129) 评论(0) 推荐(0)

4. Quartz2D 绘制文字
摘要:#pragma mark 绘制文字(中文)-(void)drawText2:(CGContextRef)context{ NSString *string = @"博阿士大夫撒风景撒开了房间撒"; //1.获取字体 NSLog(@"%@",[UIFont familyNames])... 阅读全文

posted @ 2015-02-17 12:36 雾里寻梦 阅读(295) 评论(0) 推荐(0)

3. Quartz2D 绘制矩形、圆形、弧形
摘要:#pragma mark 绘制圆弧-(void) drawArc:(CGContextRef)context{ //1.设置路径 /** 1)context 上下文 2)x,y 圆弧所在圆的中心点坐标 3)radius 半径 4)startAngle en... 阅读全文

posted @ 2015-02-17 12:35 雾里寻梦 阅读(226) 评论(0) 推荐(0)

1. Quartz2D 基本概念
摘要:1. Quartz2D 基本概念 阅读全文

posted @ 2015-02-17 11:12 雾里寻梦 阅读(115) 评论(0) 推荐(0)

2. Quartz2D 绘制直线
摘要:#import @interface MyView : UIView@end#import "MyView.h"@implementation MyView-(void) drawRect:(CGRect)rect{ //1.取出上下文 --当前绘图的位置(设备) CGContextRe... 阅读全文

posted @ 2015-02-17 11:10 雾里寻梦 阅读(169) 评论(0) 推荐(0)

导航