summaryrefslogtreecommitdiffstats
path: root/tiny_skia
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-10 16:26:55 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-10 16:26:55 +0200
commit32cd456fb936117307c178b4d47ae89124c8329a (patch)
tree6eafe77cc00eef587b489c6aa62d231bf0581659 /tiny_skia
parent1e802e776cb591f3860d1bfbaa1423d356fc8456 (diff)
downloadiced-32cd456fb936117307c178b4d47ae89124c8329a.tar.gz
iced-32cd456fb936117307c178b4d47ae89124c8329a.tar.bz2
iced-32cd456fb936117307c178b4d47ae89124c8329a.zip
Account for `transformation` in `Text::visible_bounds`
Diffstat (limited to 'tiny_skia')
-rw-r--r--tiny_skia/src/layer.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/tiny_skia/src/layer.rs b/tiny_skia/src/layer.rs
index 0d770d81..17e6ac13 100644
--- a/tiny_skia/src/layer.rs
+++ b/tiny_skia/src/layer.rs
@@ -200,9 +200,7 @@ impl Layer {
|text| {
text.visible_bounds()
.into_iter()
- .filter_map(|bounds| {
- bounds.intersection(&text_a.clip_bounds())
- })
+ .map(|bounds| bounds * text_a.transformation())
.collect()
},
|text_a, text_b| text_a == text_b,