diff --git a/Classes/BEMPathManager.m b/Classes/BEMPathManager.m index ce5ab44..1c63be8 100755 --- a/Classes/BEMPathManager.m +++ b/Classes/BEMPathManager.m @@ -16,13 +16,13 @@ - (UIBezierPath *)pathForBox { UIBezierPath* path; switch (self.boxType) { case BEMBoxTypeSquare: - path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, self.size, self.size) cornerRadius:self.cornerRadius]; + path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0.0 + (self.lineWidth / 2.0), 0.0 + (self.lineWidth / 2.0), self.size - self.lineWidth, self.size - self.lineWidth) cornerRadius:self.cornerRadius]; [path applyTransform:CGAffineTransformRotate(CGAffineTransformIdentity, M_PI * 2.5)]; [path applyTransform:CGAffineTransformMakeTranslation(self.size, 0)]; break; default: { - CGFloat radius = self.size / 2; + CGFloat radius = (self.size / 2.0) - (self.lineWidth / 2.0);; path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.size / 2, self.size / 2) radius: radius startAngle: - M_PI / 4