//
// SCHPic1.m
// Contextschtest1
//
// Created by tianshangrenjian on 15/6/29.
// Copyright (c) 2015年 tianshangrenjian. All rights reserved.
//
#import "SCHPic1.h"
@implementation SCHPic1
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
CGContextRef ctx=UIGraphicsGetCurrentContext();
CGMutablePathRef path=CGPathCreateMutable();
CGPathMoveToPoint(path, NULL, 0, 0);
CGPathAddLineToPoint(path, NULL, 100, 100);
CGContextAddPath(ctx, path);
CGContextStrokePath(ctx);
CGContextMoveToPoint(ctx, 20,0);
CGContextAddLineToPoint(ctx, 100, 100);
CGContextStrokePath(ctx);
CGContextClosePath(ctx);
}
@end