PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
Mark the alpha changes as PdfCraft patches
MarekSpodBiedry853851075f1b
diff --git a/vendor/hayro-interpret/src/interpret/path.rs b/vendor/hayro-interpret/src/interpret/path.rsindex cd0767367..c1fd47f39 100644--- a/vendor/hayro-interpret/src/interpret/path.rs+++ b/vendor/hayro-interpret/src/interpret/path.rs@@ -159,7 +159,7 @@ pub(crate) fn get_paint<'a>(context: &Context<'a>, is_stroke: bool) -> Paint<'a>pattern.set_transfer_function(tf.clone());}- // `CA`/`ca` can be set by a `gs` after the pattern colour operator, so use the alpha current at paint time.+ // PdfCraft patch: `CA`/`ca` can be set by a `gs` after the pattern colour operator, so use the alpha current at paint time.pattern.set_alpha(data.alpha);pattern.pre_concat_transform(context.root_transform());diff --git a/vendor/hayro-interpret/src/pattern.rs b/vendor/hayro-interpret/src/pattern.rsindex b8ff23db2..054a88e0d 100644--- a/vendor/hayro-interpret/src/pattern.rs+++ b/vendor/hayro-interpret/src/pattern.rs@@ -62,7 +62,7 @@ impl<'a> Pattern<'a> {}}- /// Set the alpha of the graphics state in effect when the pattern is painted. The `gs` operator+ /// PdfCraft patch: set the alpha of the graphics state in effect when the pattern is painted. The `gs` operator/// can come after `scn`/`SCN`, so the alpha must not be captured when the pattern is selected.pub(crate) fn set_alpha(&mut self, alpha: f32) {if let Self::Shading(p) = self {