summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
author+merlan #flirora <flirora@flirora.xyz>2025-02-12 07:38:40 -0500
committerLaurenz <laurmaedje@gmail.com>2025-02-12 13:53:05 +0100
commitc259545c6e628c35cde82c0cb22f432323cb6df3 (patch)
tree3f497f7bc88899e417aeac98f42c85f8a60c9a9e /tests
parente470ccff19e3c3ffc177ce79645e24ef2f339498 (diff)
`Gradient::repeat`: Fix floating-point error in stop calculation (#5837)
Diffstat (limited to 'tests')
-rw-r--r--tests/suite/visualize/gradient.typ8
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())