#[non_exhaustive]pub enum StockBrush {
Marker,
PressurePen,
Highlighter,
DashedLine,
}Expand description
One of Ink’s built-in brush families.
Stock brushes are versioned so that strokes stored as input points plus a
brush spec still look the way they did when drawn, even after Ink is
upgraded. StockBrush::family takes the latest version;
StockBrush::family_version pins one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Marker
A simple circular fixed-width brush.
PressurePen
Pressure- and speed-sensitive, tuned for handwriting with a stylus.
Highlighter
A chisel tip, meant to be used with a translucent colour.
DashedLine
Rounded rectangles with gaps between them, for decoration or for showing a lasso selection.
Implementations§
Source§impl StockBrush
impl StockBrush
Sourcepub fn family(self) -> BrushFamily
pub fn family(self) -> BrushFamily
The latest version of this stock brush.
Sourcepub fn family_version(self, version: u32) -> BrushFamily
pub fn family_version(self, version: u32) -> BrushFamily
A specific version of this stock brush. Version 0 means the latest.
Trait Implementations§
Source§impl Clone for StockBrush
impl Clone for StockBrush
Source§fn clone(&self) -> StockBrush
fn clone(&self) -> StockBrush
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StockBrush
Source§impl Debug for StockBrush
impl Debug for StockBrush
impl Eq for StockBrush
Source§impl Hash for StockBrush
impl Hash for StockBrush
Source§impl PartialEq for StockBrush
impl PartialEq for StockBrush
Source§fn eq(&self, other: &StockBrush) -> bool
fn eq(&self, other: &StockBrush) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StockBrush
Auto Trait Implementations§
impl Freeze for StockBrush
impl RefUnwindSafe for StockBrush
impl Send for StockBrush
impl Sync for StockBrush
impl Unpin for StockBrush
impl UnsafeUnpin for StockBrush
impl UnwindSafe for StockBrush
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