From ddcfcba188bf724e2080371a504167dfee729521 Mon Sep 17 00:00:00 2001 From: TimTom <16622597+timtom-dev@users.noreply.github.com> Date: Thu, 26 Sep 2024 02:29:35 -0600 Subject: [PATCH] Add fn encoding_mut() to Scene. (#701) This is a useful escape hatch to implement things not supported by the standard API. --------- Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> --- vello/src/scene.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vello/src/scene.rs b/vello/src/scene.rs index 7c06aac42..83edd04b9 100644 --- a/vello/src/scene.rs +++ b/vello/src/scene.rs @@ -65,6 +65,13 @@ impl Scene { &self.encoding } + /// Returns a mutable reference to the underlying raw encoding. + /// + /// This can be used to more easily create invalid scenes, and so should be used with care. + pub fn encoding_mut(&mut self) -> &mut Encoding { + &mut self.encoding + } + /// Pushes a new layer clipped by the specified shape and composed with /// previous layers using the specified blend mode. ///