summaryrefslogtreecommitdiffstats
path: root/graphics/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-06-28 01:40:53 +0200
committerLibravatar GitHub <noreply@github.com>2023-06-28 01:40:53 +0200
commit8d65e40a1174ecb8225ce9973575bced36e7aeb5 (patch)
treeb530ef68f1424dc7a6ef52af0ecf5291750632fd /graphics/src
parentaf62ec1c877d0d6d29277fb7dcfd4c681fd499af (diff)
parent00859c25f576b399871de74f0b9399d074deea35 (diff)
downloadiced-8d65e40a1174ecb8225ce9973575bced36e7aeb5.tar.gz
iced-8d65e40a1174ecb8225ce9973575bced36e7aeb5.tar.bz2
iced-8d65e40a1174ecb8225ce9973575bced36e7aeb5.zip
Merge pull request #1934 from iced-rs/reuse-text-cache-entries
Reuse entries in `text::Cache`
Diffstat (limited to 'graphics/src')
-rw-r--r--graphics/src/backend.rs2
-rw-r--r--graphics/src/renderer.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/graphics/src/backend.rs b/graphics/src/backend.rs
index 6a082576..70ccc664 100644
--- a/graphics/src/backend.rs
+++ b/graphics/src/backend.rs
@@ -38,7 +38,7 @@ pub trait Text {
font: Font,
bounds: Size,
shaping: text::Shaping,
- ) -> (f32, f32);
+ ) -> Size;
/// Tests whether the provided point is within the boundaries of [`Text`]
/// laid out with the given parameters, returning information about
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs
index 4241d45c..7e70a766 100644
--- a/graphics/src/renderer.rs
+++ b/graphics/src/renderer.rs
@@ -133,7 +133,7 @@ where
font: Font,
bounds: Size,
shaping: text::Shaping,
- ) -> (f32, f32) {
+ ) -> Size {
self.backend().measure(
content,
size,