Enum iced_graphics::Primitive
source · pub enum Primitive<T> {
Text {
content: String,
bounds: Rectangle,
color: Color,
size: Pixels,
line_height: LineHeight,
font: Font,
horizontal_alignment: Horizontal,
vertical_alignment: Vertical,
shaping: Shaping,
clip_bounds: Rectangle,
},
Paragraph {
paragraph: Weak,
position: Point,
color: Color,
clip_bounds: Rectangle,
},
Editor {
editor: Weak,
position: Point,
color: Color,
clip_bounds: Rectangle,
},
RawText(Raw),
Quad {
bounds: Rectangle,
background: Background,
border: Border,
shadow: Shadow,
},
Image {
handle: Handle,
filter_method: FilterMethod,
bounds: Rectangle,
},
Svg {
handle: Handle,
color: Option<Color>,
bounds: Rectangle,
},
Group {
primitives: Vec<Primitive<T>>,
},
Clip {
bounds: Rectangle,
content: Box<Primitive<T>>,
},
Transform {
transformation: Transformation,
content: Box<Primitive<T>>,
},
Cache {
content: Arc<Primitive<T>>,
},
Custom(T),
}
Expand description
A rendering primitive.
Variants§
Text
Fields
§
line_height: LineHeight
The line height of the text.
§
horizontal_alignment: Horizontal
The horizontal alignment of the text.
A text primitive
Paragraph
Fields
§
paragraph: Weak
The paragraph::Weak
reference.
A paragraph primitive
Editor
Fields
§
editor: Weak
The editor::Weak
reference.
An editor primitive
RawText(Raw)
A raw cosmic-text
primitive
Quad
Fields
§
background: Background
The background of the quad
A quad primitive
Image
Fields
§
filter_method: FilterMethod
The filter method of the image
An image primitive
Svg
Fields
An SVG primitive
Group
A group of primitives
Clip
A clip primitive
Transform
Fields
§
transformation: Transformation
The Transformation
A primitive that applies a Transformation
Cache
A cached primitive.
This can be useful if you are implementing a widget where primitive generation is expensive.
Custom(T)
A backend-specific primitive.
Implementations§
Trait Implementations§
source§impl<T: PartialEq> PartialEq for Primitive<T>
impl<T: PartialEq> PartialEq for Primitive<T>
impl<T> StructuralPartialEq for Primitive<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Primitive<T>
impl<T> Send for Primitive<T>
impl<T> Sync for Primitive<T>
impl<T> Unpin for Primitive<T>where
T: Unpin,
impl<T> !UnwindSafe for Primitive<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more