diff options
| author | +merlan #flirora <flirora@flirora.xyz> | 2025-02-12 07:38:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-12 12:38:40 +0000 |
| commit | 02cd43e27f2aafd7c332d7672a837e1b11cce120 (patch) | |
| tree | e6165259b163ef8364c45645f8b03d507f8e7e63 /tests | |
| parent | 83ad407d3ccff4a8de1e7ffe198bfed874f5c0c7 (diff) | |
`Gradient::repeat`: Fix floating-point error in stop calculation (#5837)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/suite/visualize/gradient.typ | 8 |
1 files changed, 8 insertions, 0 deletions
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()) |
