diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/bugs/gradient-cmyk-encode.png | bin | 0 -> 875 bytes | |||
| -rw-r--r-- | tests/typ/bugs/gradient-cmyk-encode.typ | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/ref/bugs/gradient-cmyk-encode.png b/tests/ref/bugs/gradient-cmyk-encode.png Binary files differnew file mode 100644 index 00000000..7bd82cce --- /dev/null +++ b/tests/ref/bugs/gradient-cmyk-encode.png diff --git a/tests/typ/bugs/gradient-cmyk-encode.typ b/tests/typ/bugs/gradient-cmyk-encode.typ new file mode 100644 index 00000000..5e0b58dc --- /dev/null +++ b/tests/typ/bugs/gradient-cmyk-encode.typ @@ -0,0 +1,27 @@ +// Test that CMYK works on gradients + +--- +#set page(margin: 0pt, width: 200pt, height: auto) + +#let violet = cmyk(75%, 80%, 0%, 0%) +#let blue = cmyk(75%, 30%, 0%, 0%) + +#rect( + width: 100%, + height: 30pt, + fill: gradient.linear(violet, blue) +) + +#rect( + width: 100%, + height: 30pt, + fill: gradient.linear(rgb(violet), rgb(blue)) +) + +// In PDF format, this gradient can look different from the others. +// This is because PDF readers do weird things with CMYK. +#rect( + width: 100%, + height: 30pt, + fill: gradient.linear(violet, blue, space: cmyk) +) |
