From 02cd43e27f2aafd7c332d7672a837e1b11cce120 Mon Sep 17 00:00:00 2001 From: +merlan #flirora Date: Wed, 12 Feb 2025 07:38:40 -0500 Subject: `Gradient::repeat`: Fix floating-point error in stop calculation (#5837) --- tests/suite/visualize/gradient.typ | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/suite/visualize/gradient.typ b/tests/suite/visualize/gradient.typ index b221f411..811b8b60 100644 --- a/tests/suite/visualize/gradient.typ +++ b/tests/suite/visualize/gradient.typ @@ -658,3 +658,11 @@ $ A = mat( height: 10pt, fill: gradient.linear(violet, blue, space: cmyk) ) + +--- issue-5819-gradient-repeat --- +// Ensure the gradient constructor generates monotonic stops which can be fed +// back into the gradient constructor itself. +#let my-gradient = gradient.linear(red, blue).repeat(5) +#let _ = gradient.linear(..my-gradient.stops()) +#let my-gradient2 = gradient.linear(red, blue).repeat(5, mirror: true) +#let _ = gradient.linear(..my-gradient2.stops()) -- cgit v1.2.3