summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-06-29 08:09:45 +0200
committerLibravatar GitHub <noreply@github.com>2023-06-29 08:09:45 +0200
commitc6b583113da7c9d9ceaeb5a3bf676ae62d8931e1 (patch)
treeed833fab41f64c57a7522fea400ea42eec788e9f /core/src
parent8d65e40a1174ecb8225ce9973575bced36e7aeb5 (diff)
parent6921564c9f66e8103e19ec658099c5f5c32e8cc5 (diff)
downloadiced-c6b583113da7c9d9ceaeb5a3bf676ae62d8931e1.tar.gz
iced-c6b583113da7c9d9ceaeb5a3bf676ae62d8931e1.tar.bz2
iced-c6b583113da7c9d9ceaeb5a3bf676ae62d8931e1.zip
Merge pull request #1932 from iced-rs/generic-graphics-primitive
Backend-specific primitives
Diffstat (limited to 'core/src')
-rw-r--r--core/src/renderer.rs15
1 files changed, 1 insertions, 14 deletions
diff --git a/core/src/renderer.rs b/core/src/renderer.rs
index 7c73d2e4..1b327e56 100644
--- a/core/src/renderer.rs
+++ b/core/src/renderer.rs
@@ -5,26 +5,13 @@ mod null;
#[cfg(debug_assertions)]
pub use null::Null;
-use crate::layout;
-use crate::{Background, BorderRadius, Color, Element, Rectangle, Vector};
+use crate::{Background, BorderRadius, Color, Rectangle, Vector};
/// A component that can be used by widgets to draw themselves on a screen.
pub trait Renderer: Sized {
/// The supported theme of the [`Renderer`].
type Theme;
- /// Lays out the elements of a user interface.
- ///
- /// You should override this if you need to perform any operations before or
- /// after layouting. For instance, trimming the measurements cache.
- fn layout<Message>(
- &mut self,
- element: &Element<'_, Message, Self>,
- limits: &layout::Limits,
- ) -> layout::Node {
- element.as_widget().layout(self, limits)
- }
-
/// Draws the primitives recorded in the given closure in a new layer.
///
/// The layer will clip its contents to the provided `bounds`.