Skip to content

Commit ad1cdfd

Browse files
committed
Make line graphs slightly thicker and smoother. (Thanks to GitHub user Superevr for the code suggestion.)
1 parent 83b850a commit ad1cdfd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Graph Views/XRGGenericView.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,18 @@ - (void)drawRangedGraphWithData:(CGFloat *)samples size:(NSInteger)nSamples curr
156156

157157
[color set];
158158
NSBezierPath *bp = [NSBezierPath bezierPath];
159-
[bp setLineWidth:0.0f];
160-
[bp setFlatness: 0.6f];
161159
[bp appendBezierPathWithPoints:points count:(currentPointIndex + (1 - filledOffset))];
162160
if (filled) {
161+
[bp setLineWidth:0.0f];
162+
[bp setFlatness: 0.6f];
163163
[bp closePath];
164164
[bp fill];
165165
}
166166
else {
167+
[bp setLineWidth:1.2f];
168+
[bp setFlatness: 10.0f];
169+
[bp setLineCapStyle:NSRoundLineCapStyle];
170+
[bp setLineJoinStyle:NSRoundLineJoinStyle];
167171
[bp stroke];
168172
}
169173

0 commit comments

Comments
 (0)