mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix chart line rendering
This commit is contained in:
parent
fce2702c50
commit
0eec0642e3
@ -68,7 +68,8 @@ class LinesChartRenderer: BaseChartRenderer {
|
||||
context.setAlpha(alpha)
|
||||
context.setStrokeColor(toLine.color.cgColor)
|
||||
context.setLineWidth(lineWidth)
|
||||
context.setLineCap(.round)
|
||||
|
||||
context.beginTransparencyLayer(auxiliaryInfo: nil)
|
||||
|
||||
if linesShapeAnimator.isAnimating {
|
||||
let animationOffset = linesShapeAnimator.current
|
||||
@ -315,9 +316,8 @@ class LinesChartRenderer: BaseChartRenderer {
|
||||
lines.removeLast()
|
||||
}
|
||||
|
||||
context.beginTransparencyLayer(auxiliaryInfo: nil)
|
||||
context.setLineCap(.round)
|
||||
context.strokeLineSegments(between: lines)
|
||||
context.endTransparencyLayer()
|
||||
} else {
|
||||
if var index = toLine.points.firstIndex(where: { $0.x >= range.lowerBound }) {
|
||||
var lines: [CGPoint] = []
|
||||
@ -433,9 +433,11 @@ class LinesChartRenderer: BaseChartRenderer {
|
||||
lines.removeLast()
|
||||
}
|
||||
|
||||
context.setLineCap(.round)
|
||||
context.strokeLineSegments(between: lines)
|
||||
}
|
||||
}
|
||||
context.endTransparencyLayer()
|
||||
context.setAlpha(1.0)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user