pub struct StripGenerator {
level: Level,
alphas: Vec<u8>,
line_buf: Vec<Line>,
flatten_ctx: FlattenCtx,
tiles: Tiles,
strip_buf: Vec<Strip>,
width: u16,
height: u16,
}
Expand description
An object for easily generating strips for a filled/stroked path.
Fields§
§level: Level
§alphas: Vec<u8>
§line_buf: Vec<Line>
§flatten_ctx: FlattenCtx
§tiles: Tiles
§strip_buf: Vec<Strip>
§width: u16
§height: u16
Implementations§
Source§impl StripGenerator
impl StripGenerator
Sourcepub fn generate_filled_path<'a>(
&'a mut self,
path: impl IntoIterator<Item = PathEl>,
fill_rule: Fill,
transform: Affine,
anti_alias: bool,
func: impl FnOnce(&'a [Strip]),
)
pub fn generate_filled_path<'a>( &'a mut self, path: impl IntoIterator<Item = PathEl>, fill_rule: Fill, transform: Affine, anti_alias: bool, func: impl FnOnce(&'a [Strip]), )
Generate the strips for a filled path.
Sourcepub fn generate_stroked_path<'a>(
&'a mut self,
path: impl IntoIterator<Item = PathEl>,
stroke: &Stroke,
transform: Affine,
anti_alias: bool,
func: impl FnOnce(&'a [Strip]),
)
pub fn generate_stroked_path<'a>( &'a mut self, path: impl IntoIterator<Item = PathEl>, stroke: &Stroke, transform: Affine, anti_alias: bool, func: impl FnOnce(&'a [Strip]), )
Generate the strips for a stroked path.
Sourcepub fn alpha_buf(&self) -> &[u8] ⓘ
pub fn alpha_buf(&self) -> &[u8] ⓘ
Return a reference to the current alpha buffer of the strip generator.
Sourcepub fn extend_alpha_buf(&mut self, alphas: &[u8])
pub fn extend_alpha_buf(&mut self, alphas: &[u8])
Extend the alpha buffer with the given alphas.
Sourcepub fn set_alpha_buf(&mut self, alpha_buf: Vec<u8>)
pub fn set_alpha_buf(&mut self, alpha_buf: Vec<u8>)
Set the alpha buffer.
Sourcepub fn take_alpha_buf(&mut self) -> Vec<u8> ⓘ
pub fn take_alpha_buf(&mut self) -> Vec<u8> ⓘ
Take the alpha buffer and set it to an empty one.
Sourcepub fn replace_alpha_buf(&mut self, alphas: Vec<u8>) -> Vec<u8> ⓘ
pub fn replace_alpha_buf(&mut self, alphas: Vec<u8>) -> Vec<u8> ⓘ
Swap the alpha buffer with the given one.
fn make_strips(&mut self, fill_rule: Fill, anti_alias: bool)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StripGenerator
impl RefUnwindSafe for StripGenerator
impl Send for StripGenerator
impl Sync for StripGenerator
impl Unpin for StripGenerator
impl UnwindSafe for StripGenerator
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