diff options
| author | 2023-10-24 02:51:02 +0200 | |
|---|---|---|
| committer | 2024-02-02 01:55:32 +0100 | |
| commit | aa41d7656e734b5dae3c19dff87afbc74617a67f (patch) | |
| tree | 2b2a074998ed5d39e2901d25627a295d3dfb24d4 /core | |
| parent | 9b8614a4e2252f0b74d1a1b38b5e5bb55b1af995 (diff) | |
| download | iced-aa41d7656e734b5dae3c19dff87afbc74617a67f.tar.gz iced-aa41d7656e734b5dae3c19dff87afbc74617a67f.tar.bz2 iced-aa41d7656e734b5dae3c19dff87afbc74617a67f.zip | |
Apply `Transform` scaling to text primitives
Diffstat (limited to '')
| -rw-r--r-- | core/src/pixels.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<Pixels> for f32 { pixels.0 } } + +impl std::ops::Mul<f32> for Pixels { + type Output = Pixels; + + fn mul(self, rhs: f32) -> Self { + Pixels(self.0 * rhs) + } +} |
