Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #182 from vtim/patch-1
Browse files Browse the repository at this point in the history
[SSPieProgressView] Tweak to support "clearColor" border
  • Loading branch information
soffes committed May 24, 2013
2 parents 1403f02 + cd289d6 commit 38ad21d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SSToolkit/SSPieProgressView.m
Expand Up @@ -105,10 +105,10 @@ - (void)drawRect:(CGRect)rect {

// Math
CGPoint center = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect));
CGFloat radius = center.y;
CGFloat radius = floorf((rect.size.width - _pieBorderWidth) / 2);
CGFloat angle = DEGREES_TO_RADIANS((360.0f * _progress) + kAngleOffset);
CGPoint points[3] = {
CGPointMake(center.x, 0.0f),
CGPointMake(center.x, ceilf(_pieBorderWidth / 2)),
center,
CGPointMake(center.x + radius * cosf(angle), center.y + radius * sinf(angle))
};
Expand Down

0 comments on commit 38ad21d

Please sign in to comment.