CAShapeLayer *mask = [[CAShapeLayer alloc] init];
mask.frame = CGRectMake(50, 50, 100, 100);
CGFloat width = 100;
CGFloat height = 100;
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path, nil, 30, 30);
CGPathAddLineToPoint(path, nil, width, 30);
CGPathAddLine...