Fixed shape path stroke glitch

This commit is contained in:
terryworona
2015-12-28 15:08:29 -08:00
parent 2fc1655e38
commit ce2cda8169
2 changed files with 5 additions and 1 deletions
@@ -136,9 +136,13 @@ NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
fillGradientLayer.frame = fillLayer.frame;
fillLayer.path = fillPath.CGPath;
CGColorRef shapeLayerStrokeColor = shapeLayer.strokeColor;
shapeLayer.strokeColor = [UIColor colorWithWhite:1 alpha:[fillGradientLayer alpha]].CGColor; // mask uses alpha only
fillGradientLayer.mask = fillLayer;
[self.layer addSublayer:fillGradientLayer];
// Refresh shape layer stroke (used below)
shapeLayer.strokeColor = shapeLayerStrokeColor;
}
/*
@@ -282,7 +282,7 @@ NSString * const kJBLineChartViewControllerNavButtonViewKey = @"view";
- (UIColor *)lineChartView:(JBLineChartView *)lineChartView fillColorForLineAtLineIndex:(NSUInteger)lineIndex
{
return (lineIndex == JBLineChartLineSolid) ? [UIColor redColor] : [UIColor clearColor];
return (lineIndex == JBLineChartLineSolid) ? [UIColor clearColor] : [UIColor blueColor];
}
#pragma mark - Buttons