Type Alias iced_tiny_skia::Primitive
source · pub type Primitive = Primitive<Custom>;
Aliased Type§
enum Primitive {
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,
border_radius: [f32; 4],
},
Svg {
handle: Handle,
color: Option<Color>,
bounds: Rectangle,
},
Group {
primitives: Vec<Primitive<Custom>>,
},
Clip {
bounds: Rectangle,
content: Box<Primitive<Custom>>,
},
Translate {
translation: Vector,
content: Box<Primitive<Custom>>,
},
Cache {
content: Arc<Primitive<Custom>>,
},
Custom(Custom),
}
Variants§
Text
A text primitive
Fields
§
line_height: LineHeight
The line height of the text.
§
horizontal_alignment: Horizontal
The horizontal alignment of the text.
Paragraph
A paragraph primitive
Fields
Editor
An editor primitive
Fields
RawText(Raw)
A raw cosmic-text
primitive
Quad
A quad primitive
Fields
§
background: Background
The background of the quad
Image
An image primitive
Fields
§
filter_method: FilterMethod
The filter method of the image
Svg
An SVG primitive
Fields
Group
A group of primitives
Clip
A clip primitive
Fields
Translate
A primitive that applies a translation
Fields
Cache
A cached primitive.
This can be useful if you are implementing a widget where primitive generation is expensive.
Custom(Custom)
A backend-specific primitive.