//
//  RouteLineView.m
//  GotoBus
//
//  Created by 包光清 on 2018/6/21.
//

#import "RouteLineView.h"

@implementation RouteLineView

- (instancetype)init {
    if(self = [super init]) {
    
    }
    return self;
}

- (void)drawRect:(CGRect)rect {
    double lineWidth = 1.0;
    
    CGContextRef context = UIGraphicsGetCurrentContext();

    
    CGContextSetLineWidth(context, lineWidth);
    
    CGContextSetStrokeColorWithColor(context, [UIColor lightGrayColor].CGColor);
 
    CGContextAddArc(context,rect.size.width / 2.0 , 6, 3 , 0, 2 * M_PI, 0);
    
    CGContextDrawPath(context, kCGPathStroke);
    
    

    CGContextSetLineWidth(context, lineWidth);
    
    CGContextSetStrokeColorWithColor(context, [UIColor lightGrayColor].CGColor);

    
    CGContextMoveToPoint(context,rect.size.width / 2.0, 9);
    
    CGContextAddLineToPoint(context,rect.size.width / 2.0, rect.size.height - 12);
    
    CGContextStrokePath(context);
    
    
    
    CGContextAddArc(context, rect.size.width / 2.0, rect.size.height - 9, 3 , 0, 2 * M_PI, 0);
    
    CGContextSetFillColorWithColor(context, [UIColor lightGrayColor].CGColor);
    
    CGContextDrawPath(context, kCGPathFill);
}

@end
