Introduce Border struct analogous to Shadow

This commit is contained in:
Héctor Ramón Jiménez 2024-01-20 13:29:25 +01:00
parent 4d502012b3
commit 25f182f933
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
44 changed files with 382 additions and 424 deletions

View file

@ -4,7 +4,7 @@ use crate::core::image;
use crate::core::svg;
use crate::core::text;
use crate::core::{
Background, Color, Font, Pixels, Point, Rectangle, Shadow, Vector,
Background, Border, Color, Font, Pixels, Point, Rectangle, Shadow, Vector,
};
use crate::text::editor;
use crate::text::paragraph;
@ -67,14 +67,10 @@ pub enum Primitive<T> {
bounds: Rectangle,
/// The background of the quad
background: Background,
/// The border radii of the quad
border_radius: [f32; 4],
/// The border width of the quad
border_width: f32,
/// The border color of the quad
border_color: Color,
/// The [`Border`] of the quad
border: Border,
/// The [`Shadow`] of the quad
shadow: Option<Shadow>,
shadow: Shadow,
},
/// An image primitive
Image {