From aa41d7656e734b5dae3c19dff87afbc74617a67f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 24 Oct 2023 02:51:02 +0200 Subject: Apply `Transform` scaling to text primitives --- core/src/pixels.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/src') diff --git a/core/src/pixels.rs b/core/src/pixels.rs index 6a9e5c88..425c0028 100644 --- a/core/src/pixels.rs +++ b/core/src/pixels.rs @@ -26,3 +26,11 @@ impl From for f32 { pixels.0 } } + +impl std::ops::Mul for Pixels { + type Output = Pixels; + + fn mul(self, rhs: f32) -> Self { + Pixels(self.0 * rhs) + } +} -- cgit