Permalink
Browse files

Merge pull request #182 from vtim/patch-1

[SSPieProgressView] Tweak to support "clearColor" border
  • Loading branch information...
2 parents 1403f02 + cd289d6 commit 38ad21da6519dd2e0ba9683b7eb094b7582e8f77 @soffes committed May 24, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 SSToolkit/SSPieProgressView.m
@@ -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))
};

0 comments on commit 38ad21d

Please sign in to comment.