summaryrefslogtreecommitdiff
path: root/crates/typst-pdf/src/gradient.rs
diff options
context:
space:
mode:
authorSébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com>2024-09-02 15:16:33 +0200
committerGitHub <noreply@github.com>2024-09-02 13:16:33 +0000
commitecad396cc8e6a0c5742314907181c939f61ab96d (patch)
tree6a9dfd4c587d2c060e5ed50eb1d78e8bfe322b2b /crates/typst-pdf/src/gradient.rs
parent51df7aee763d162b3aeec0a59788818e0292004f (diff)
Nuked custom PDF Oklab colorspace code (#4871)
Diffstat (limited to 'crates/typst-pdf/src/gradient.rs')
-rw-r--r--crates/typst-pdf/src/gradient.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-pdf/src/gradient.rs b/crates/typst-pdf/src/gradient.rs
index 81dc2748..28078365 100644
--- a/crates/typst-pdf/src/gradient.rs
+++ b/crates/typst-pdf/src/gradient.rs
@@ -181,9 +181,9 @@ fn shading_function(
for window in gradient.stops_ref().windows(2) {
let (first, second) = (window[0], window[1]);
- // If we have a hue index, we will create several stops in-between
- // to make the gradient smoother without interpolation issues with
- // native color spaces.
+ // If we have a hue index or are using Oklab, we will create several
+ // stops in-between to make the gradient smoother without interpolation
+ // issues with native color spaces.
let mut last_c = first.0;
if gradient.space().hue_index().is_some() {
for i in 0..=32 {