Skip to content

Commit 1539186

Browse files
committed
initviz: fix chart overflow artifacts in filled charts
Set line width to 0 before filling charts to prevent the stroke from extending beyond the intended fill area, eliminating visual artifacts at chart boundaries. Adapted from xrmx/bootchart#42 (PATCH 008/182) Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 036c2e5 commit 1539186

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

initviz/draw.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ def transform_point_coords(point, x_base, y_base, \
263263
chart_bounds[0], chart_bounds[1])
264264
ctx.line_to(x, y)
265265
if fill:
266+
ctx.set_line_width(0.0)
266267
ctx.stroke_preserve()
267268
ctx.line_to(last[0], chart_bounds[1]+chart_bounds[3])
268269
ctx.line_to(first[0], chart_bounds[1]+chart_bounds[3])

0 commit comments

Comments
 (0)