Skip to content

Commit

Permalink
fix the Analyze issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
pyanfield committed Mar 18, 2012
1 parent 773636f commit 71c9208
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions WSCharts/WSPieChartView.m
Expand Up @@ -71,7 +71,7 @@ @interface WSPieChartView()


- (CGPoint)calculateOpenedPoint:(int)i withRadius:(float)radius isHalfAngle:(BOOL)isHalf;
- (CGMutablePathRef)createPiePathWithCenter:(CGPoint)c withRadius:(CGFloat)r startAngle:(CGFloat)sa withAngle:(CGFloat)pa transform:(CGAffineTransform)t;
- (CGMutablePathRef)newPiePathWithCenter:(CGPoint)c withRadius:(CGFloat)r startAngle:(CGFloat)sa withAngle:(CGFloat)pa transform:(CGAffineTransform)t;
- (void)closeAllPieDataIsOpenedAsNO:(int)openedPieNum;
- (void)createIndicators:(int)num;
- (void)createShadow:(BOOL)opened openedPieNum:(int)i;
Expand Down Expand Up @@ -109,7 +109,7 @@ - (void)setData:(NSMutableDictionary *)dict
{
NSMutableArray* _indicatorPoints = [[NSMutableArray alloc] init];
NSMutableArray* _openedPoints = [[NSMutableArray alloc] init];
NSMutableArray* _names = [[NSMutableArray alloc] init];
NSMutableArray* _names;
NSMutableArray* _startAngles = [[NSMutableArray alloc] init];

NSArray *values = [dict allValues];
Expand Down Expand Up @@ -221,7 +221,7 @@ - (void)drawRect:(CGRect)rect
if (pie.isOpened) {
transform = CGAffineTransformMakeTranslation(pie.openedPoint.x-self.center.x,pie.openedPoint.y-self.center.y);
}
CGMutablePathRef path = [self createPiePathWithCenter:center
CGMutablePathRef path = [self newPiePathWithCenter:center
withRadius:pieRadius
startAngle:pie.startAngle
withAngle:2.0*M_PI*pie.percent
Expand Down Expand Up @@ -259,15 +259,15 @@ - (void)createShadow:(BOOL)opened openedPieNum:(int)i
//draw opened sector shadow
WSPieData *pie = [self.pies objectAtIndex:i];
CGAffineTransform transform = CGAffineTransformMakeTranslation(pie.openedPoint.x-self.center.x,pie.openedPoint.y-self.center.y);
CGMutablePathRef sector = [self createPiePathWithCenter:self.center
CGMutablePathRef sector = [self newPiePathWithCenter:self.center
withRadius:pieRadius
startAngle:pie.startAngle
withAngle:2.0*M_PI*pie.percent
transform:transform];
CGContextAddPath(context, sector);
CGPathRelease(sector);
CGAffineTransform transform2 = CGAffineTransformMakeTranslation(0.0, 0.0);
CGMutablePathRef sector2 = [self createPiePathWithCenter:self.center
CGMutablePathRef sector2 = [self newPiePathWithCenter:self.center
withRadius:pieRadius
startAngle:pie.startAngle+2.0*M_PI*pie.percent
withAngle:2.0*M_PI*(1.0f-pie.percent)
Expand All @@ -288,7 +288,7 @@ - (void)createShadow:(BOOL)opened openedPieNum:(int)i
}

// create the sector path
- (CGMutablePathRef)createPiePathWithCenter:(CGPoint)c withRadius:(CGFloat)r startAngle:(CGFloat)sa withAngle:(CGFloat)pa transform:(CGAffineTransform)t
- (CGMutablePathRef)newPiePathWithCenter:(CGPoint)c withRadius:(CGFloat)r startAngle:(CGFloat)sa withAngle:(CGFloat)pa transform:(CGAffineTransform)t
{
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path, &t, c.x, c.y);
Expand Down Expand Up @@ -340,7 +340,7 @@ - (void)createIndicators:(int)num

CGPoint p1 = pie.indicatorPoint;
CGPoint p2 = [self calculateOpenedPoint:num withRadius:(INDICATOR_LENGTH+INDICATOR_RADIUS) isHalfAngle:YES];
CGPoint p3 = p2;
CGPoint p3;
if (p1.x>self.center.x) {
p3 = CGPointMake(p2.x+INDICATOR_H_LENGTH, p2.y);
[info drawAtPoint:CGPointMake(p2.x, p2.y-20.0) withFont:helveticated];
Expand Down

0 comments on commit 71c9208

Please sign in to comment.