Skip to content

Commit

Permalink
Fixed drawning of checkbox out of bounds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Karpov authored and Boris-Em committed Aug 18, 2017
1 parent 1f16a26 commit d46ce01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/BEMPathManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 + (_lineWidth / 2.0), 0.0 + (_lineWidth / 2.0), self.size - _lineWidth, self.size - _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
Expand Down

0 comments on commit d46ce01

Please sign in to comment.