From f064f0482b653a1fbee4afbddcecf91e3a399004 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 16 Apr 2020 13:22:00 +0200 Subject: Introduce `Layer` trait --- native/src/layout.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'native/src/layout.rs') diff --git a/native/src/layout.rs b/native/src/layout.rs index 4a3ab94a..178f0f24 100644 --- a/native/src/layout.rs +++ b/native/src/layout.rs @@ -34,6 +34,13 @@ impl<'a> Layout<'a> { } } + /// Gets the position of the [`Layout`]. + /// + /// [`Layout`]: struct.Layout.html + pub fn position(&self) -> Point { + self.position + } + /// Gets the bounds of the [`Layout`]. /// /// The returned [`Rectangle`] describes the position and size of a -- cgit