summaryrefslogtreecommitdiffstats
path: root/graphics/src/damage.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-01-12 06:45:40 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-12 06:45:40 +0100
commita5ae442819227b3cd55116028e6d6c96caa6fda9 (patch)
tree111e7b424a2c7044f8d98612015540282bf2ca8a /graphics/src/damage.rs
parent89fc4f54bdbf62a29fcd06bc2e77926180143413 (diff)
parent603832e66c710ea39a95009ddc905de20c6856bd (diff)
downloadiced-a5ae442819227b3cd55116028e6d6c96caa6fda9.tar.gz
iced-a5ae442819227b3cd55116028e6d6c96caa6fda9.tar.bz2
iced-a5ae442819227b3cd55116028e6d6c96caa6fda9.zip
Merge pull request #2158 from iced-rs/feature/raw-text-primitive
Introduce `RawText` to `Primitive` in `iced_graphics`
Diffstat (limited to 'graphics/src/damage.rs')
-rw-r--r--graphics/src/damage.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/src/damage.rs b/graphics/src/damage.rs
index 595cc274..59e9f5b4 100644
--- a/graphics/src/damage.rs
+++ b/graphics/src/damage.rs
@@ -73,6 +73,11 @@ impl<T: Damage> Damage for Primitive<T> {
bounds.expand(1.5)
}
+ Self::RawText(raw) => {
+ // TODO: Add `size` field to `raw` to compute more accurate
+ // damage bounds (?)
+ raw.clip_bounds.expand(1.5)
+ }
Self::Quad { bounds, .. }
| Self::Image { bounds, .. }
| Self::Svg { bounds, .. } => bounds.expand(1.0),