pub struct SfSymbolsLoader<'a> { /* private fields */ }Expand description
Loader for Apple SF Symbols (macOS only).
SF Symbols has no concept of themes. A symbol is a monochrome template,
drawn black unless Self::color gives it a foreground colour.
Implementations§
Source§impl<'a> SfSymbolsLoader<'a>
impl<'a> SfSymbolsLoader<'a>
Sourcepub fn new(id: impl Into<IconId<'a>>) -> Self
pub fn new(id: impl Into<IconId<'a>>) -> Self
Construct a new SF Symbols loader for the given icon id. Defaults: size 24 points, no fg_color.
Sourcepub fn size(self, size: u32) -> Self
pub fn size(self, size: u32) -> Self
Set the symbol’s point size (default 24), the size its symbol
configuration is made with, clamped to 1..=MAX_ICON_SIZE. A
symbol whose raster the OS draws over the 64 MiB decode bound loads
None.
Sourcepub fn color(self, color: Rgba) -> Self
pub fn color(self, color: Rgba) -> Self
Set the foreground color the monochrome symbol is drawn in; its alpha is ignored: the symbol keeps its own coverage.
Sourcepub fn color_opt(self, color: Option<Rgba>) -> Self
pub fn color_opt(self, color: Option<Rgba>) -> Self
Set the foreground color if Some, leave default if None; its
alpha is ignored, as in Self::color.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SfSymbolsLoader<'a>
impl<'a> !Send for SfSymbolsLoader<'a>
impl<'a> !Sync for SfSymbolsLoader<'a>
impl<'a> !UnwindSafe for SfSymbolsLoader<'a>
impl<'a> Forget for SfSymbolsLoader<'a>
impl<'a> Freeze for SfSymbolsLoader<'a>
impl<'a> Move for SfSymbolsLoader<'a>
impl<'a> Unpin for SfSymbolsLoader<'a>
impl<'a> UnsafeUnpin for SfSymbolsLoader<'a>
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