summaryrefslogtreecommitdiffstats
path: root/core/src/renderer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-01-20 13:52:15 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-20 13:52:15 +0100
commit545cc909c9f356dd733d273173694db9b8c28594 (patch)
treec8132edab4386bbccb07a372c3776f22abefbda3 /core/src/renderer.rs
parentb3e3f6e3c9fc6879e6681810f54d7eaa7c0f3d30 (diff)
parent1c1667c3c99fa9b1009ef416b9b3c7e5a1d53a97 (diff)
downloadiced-545cc909c9f356dd733d273173694db9b8c28594.tar.gz
iced-545cc909c9f356dd733d273173694db9b8c28594.tar.bz2
iced-545cc909c9f356dd733d273173694db9b8c28594.zip
Merge pull request #1882 from nicksenger/shadows
Quad shadows
Diffstat (limited to 'core/src/renderer.rs')
-rw-r--r--core/src/renderer.rs21
1 files changed, 14 insertions, 7 deletions
diff --git a/core/src/renderer.rs b/core/src/renderer.rs
index 1b327e56..a2a66aa8 100644
--- a/core/src/renderer.rs
+++ b/core/src/renderer.rs
@@ -5,7 +5,7 @@ mod null;
#[cfg(debug_assertions)]
pub use null::Null;
-use crate::{Background, BorderRadius, Color, Rectangle, Vector};
+use crate::{Background, Border, Color, Rectangle, Shadow, Size, Vector};
/// A component that can be used by widgets to draw themselves on a screen.
pub trait Renderer: Sized {
@@ -37,14 +37,21 @@ pub struct Quad {
/// The bounds of the [`Quad`].
pub bounds: Rectangle,
- /// The border radius of the [`Quad`].
- pub border_radius: BorderRadius,
+ /// The [`Border`] of the [`Quad`].
+ pub border: Border,
- /// The border width of the [`Quad`].
- pub border_width: f32,
+ /// The [`Shadow`] of the [`Quad`].
+ pub shadow: Shadow,
+}
- /// The border color of the [`Quad`].
- pub border_color: Color,
+impl Default for Quad {
+ fn default() -> Self {
+ Self {
+ bounds: Rectangle::with_size(Size::ZERO),
+ border: Border::default(),
+ shadow: Shadow::default(),
+ }
+ }
}
/// The styling attributes of a [`Renderer`].