From b3adf3184594c9bf60e0548a0362d30c512f3966 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 2 Feb 2024 14:43:04 +0100 Subject: Apply `Transformation` to `RawText` primitives --- wgpu/src/layer.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'wgpu/src/layer.rs') diff --git a/wgpu/src/layer.rs b/wgpu/src/layer.rs index 12588849..cc767c25 100644 --- a/wgpu/src/layer.rs +++ b/wgpu/src/layer.rs @@ -181,20 +181,13 @@ impl<'a> Layer<'a> { clip_bounds: *clip_bounds * transformation, })); } - graphics::Primitive::RawText(graphics::text::Raw { - buffer, - position, - color, - clip_bounds, - }) => { + graphics::Primitive::RawText(raw) => { let layer = &mut layers[current_layer]; - layer.text.push(Text::Raw(graphics::text::Raw { - buffer: buffer.clone(), - position: *position * transformation, - color: *color, - clip_bounds: *clip_bounds * transformation, - })); + layer.text.push(Text::Raw { + raw: raw.clone(), + transformation, + }); } Primitive::Quad { bounds, -- cgit