Fixed shape path stroke glitch
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user