diff options
author | 2023-11-29 22:28:31 +0100 | |
---|---|---|
committer | 2023-11-29 22:28:31 +0100 | |
commit | e09b4e24dda51b8212d8ece52431dacaa3922a7b (patch) | |
tree | 7005e181528134ebdde5bbbe5909273db9f30174 /graphics/src/primitive.rs | |
parent | 83c7870c569a2976923ee6243a19813094d44673 (diff) | |
parent | 7f8b17604a31e00becc43130ec516c1a53552c88 (diff) | |
download | iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.tar.gz iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.tar.bz2 iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.zip |
Merge branch 'master' into feat/multi-window-support
Diffstat (limited to 'graphics/src/primitive.rs')
-rw-r--r-- | graphics/src/primitive.rs | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/graphics/src/primitive.rs b/graphics/src/primitive.rs index 7592a410..4ed512c1 100644 --- a/graphics/src/primitive.rs +++ b/graphics/src/primitive.rs @@ -3,7 +3,9 @@ use crate::core::alignment; use crate::core::image; use crate::core::svg; use crate::core::text; -use crate::core::{Background, Color, Font, Rectangle, Vector}; +use crate::core::{Background, Color, Font, Pixels, Point, Rectangle, Vector}; +use crate::text::editor; +use crate::text::paragraph; use std::sync::Arc; @@ -19,7 +21,7 @@ pub enum Primitive<T> { /// The color of the text color: Color, /// The size of the text in logical pixels - size: f32, + size: Pixels, /// The line height of the text line_height: text::LineHeight, /// The font of the text @@ -31,6 +33,24 @@ pub enum Primitive<T> { /// The shaping strategy of the text. shaping: text::Shaping, }, + /// A paragraph primitive + Paragraph { + /// The [`paragraph::Weak`] reference. + paragraph: paragraph::Weak, + /// The position of the paragraph. + position: Point, + /// The color of the paragraph. + color: Color, + }, + /// An editor primitive + Editor { + /// The [`editor::Weak`] reference. + editor: editor::Weak, + /// The position of the paragraph. + position: Point, + /// The color of the paragraph. + color: Color, + }, /// A quad primitive Quad { /// The bounds of the quad @@ -48,6 +68,8 @@ pub enum Primitive<T> { Image { /// The handle of the image handle: image::Handle, + /// The filter method of the image + filter_method: image::FilterMethod, /// The bounds of the image bounds: Rectangle, }, |