pub struct Icon { /* private fields */ }
Expand description
Represents SVG settings, including content, colors, dimensions, and specific attributes.
Implementations§
Source§impl Icon
impl Icon
Sourcepub fn get_content(&self) -> &[String]
pub fn get_content(&self) -> &[String]
Retrieves the content paths of the SVG.
Sourcepub fn get_foreground_color(&self) -> &SvgColor
pub fn get_foreground_color(&self) -> &SvgColor
Retrieves the foreground color of the SVG.
Sourcepub fn get_background_color(&self) -> &SvgColor
pub fn get_background_color(&self) -> &SvgColor
Retrieves the background color of the SVG.
Sourcepub fn get_height(&self) -> Height
pub fn get_height(&self) -> Height
Retrieves the height of the SVG.
Sourcepub fn contents(self, content: Vec<impl ToString>) -> Self
pub fn contents(self, content: Vec<impl ToString>) -> Self
Adds multiple content paths to the SVG.
Sourcepub fn foreground_color(self, foreground_color: impl ToString) -> Self
pub fn foreground_color(self, foreground_color: impl ToString) -> Self
Sets the foreground color of the SVG.
Sourcepub fn foreground_color_none(self) -> Self
pub fn foreground_color_none(self) -> Self
Removes the foreground color of the SVG.
Sourcepub fn foreground_color_current_color(self) -> Self
pub fn foreground_color_current_color(self) -> Self
Sets the foreground color to currentColor
.
Sourcepub fn background_color(self, background_color: impl ToString) -> Self
pub fn background_color(self, background_color: impl ToString) -> Self
Sets the background color of the SVG.
Sourcepub fn background_color_none(self) -> Self
pub fn background_color_none(self) -> Self
Removes the background color of the SVG.
Sourcepub fn background_color_current_color(self) -> Self
pub fn background_color_current_color(self) -> Self
Sets the background color to currentColor
.
Sourcepub fn get_stroke_linejoin(&self) -> Option<StrokeLinejoin>
pub fn get_stroke_linejoin(&self) -> Option<StrokeLinejoin>
Retrieves the stroke line join style of the SVG.
Sourcepub fn get_stroke_width(&self) -> Option<f64>
pub fn get_stroke_width(&self) -> Option<f64>
Retrieves the stroke width of the SVG.
Sourcepub fn get_stroke_linecap(&self) -> Option<StrokeLinecap>
pub fn get_stroke_linecap(&self) -> Option<StrokeLinecap>
Retrieves the stroke line cap style of the SVG.
Sourcepub fn stroke_linejoin(self, stroke_linejoin: StrokeLinejoin) -> Self
pub fn stroke_linejoin(self, stroke_linejoin: StrokeLinejoin) -> Self
Sets the stroke line join style of the SVG.
Sourcepub fn stroke_width(self, stroke_width: f64) -> Self
pub fn stroke_width(self, stroke_width: f64) -> Self
Sets the stroke width of the SVG.
Sourcepub fn view_box(self, view_box: (u8, u8, u8, u8)) -> Self
pub fn view_box(self, view_box: (u8, u8, u8, u8)) -> Self
Sets the viewbox dimensions of the SVG.
Sourcepub fn stroke_linecap(self, stroke_linecap: StrokeLinecap) -> Self
pub fn stroke_linecap(self, stroke_linecap: StrokeLinecap) -> Self
Sets the stroke line cap style of the SVG.