summaryrefslogtreecommitdiffstats
path: root/glow/src/backend.rs
diff options
context:
space:
mode:
Diffstat (limited to 'glow/src/backend.rs')
-rw-r--r--glow/src/backend.rs23
1 files changed, 22 insertions, 1 deletions
diff --git a/glow/src/backend.rs b/glow/src/backend.rs
index 1680fc00..d97cbceb 100644
--- a/glow/src/backend.rs
+++ b/glow/src/backend.rs
@@ -7,7 +7,9 @@ use iced_graphics::font;
use iced_graphics::Layer;
use iced_graphics::Primitive;
use iced_native::mouse;
-use iced_native::{Font, HorizontalAlignment, Size, VerticalAlignment};
+use iced_native::{
+ Font, HitTestResult, HorizontalAlignment, Size, VerticalAlignment,
+};
/// A [`glow`] graphics backend for [`iced`].
///
@@ -211,6 +213,25 @@ impl backend::Text for Backend {
) -> (f32, f32) {
self.text_pipeline.measure(contents, size, font, bounds)
}
+
+ fn hit_test(
+ &self,
+ contents: &str,
+ size: f32,
+ font: Font,
+ bounds: Size,
+ point: iced_native::Point,
+ nearest_only: bool,
+ ) -> HitTestResult {
+ self.text_pipeline.hit_test(
+ contents,
+ size,
+ font,
+ bounds,
+ point,
+ nearest_only,
+ )
+ }
}
#[cfg(feature = "image")]