Renders the close-price series as a two-color baseline chart: the area and
line above baseValue are drawn in the "top" color, below it in the
"bottom" color. This matches lightweight-charts' BaselineSeries.
The two-color split is achieved with a horizontal clip at the baseline Y
rather than by computing line/baseline intersections: the full fill polygon
(close path closed down/up to the baseline) and the full close line are each
painted twice — once clipped to the region above the baseline with the top
colors, once clipped below with the bottom colors. The clip cleanly cuts
each pass to its half, so crossings render correctly with no seam math.
Renders the close-price series as a two-color baseline chart: the area and line above
baseValueare drawn in the "top" color, below it in the "bottom" color. This matches lightweight-charts' BaselineSeries.The two-color split is achieved with a horizontal clip at the baseline Y rather than by computing line/baseline intersections: the full fill polygon (close path closed down/up to the baseline) and the full close line are each painted twice — once clipped to the region above the baseline with the top colors, once clipped below with the bottom colors. The clip cleanly cuts each pass to its half, so crossings render correctly with no seam math.