pub struct ScanlineStorageBin { /* private fields */ }Expand description
Binary (non-AA) scanline storage.
Port of C++ scanline_storage_bin.
Like ScanlineStorageAa but stores only span extents, no coverage.
Implementations§
Source§impl ScanlineStorageBin
impl ScanlineStorageBin
pub fn new() -> Self
Sourcepub fn render_scanline_bin(&mut self, sl: &ScanlineBin)
pub fn render_scanline_bin(&mut self, sl: &ScanlineBin)
Store a scanline from a ScanlineBin.
Sourcepub fn render_scanline_u8(&mut self, sl: &ScanlineU8)
pub fn render_scanline_u8(&mut self, sl: &ScanlineU8)
Store a scanline from any Scanline type (uses add_span with cover_full).
Sourcepub fn rewind_scanlines(&mut self) -> bool
pub fn rewind_scanlines(&mut self) -> bool
Reset the scanline iteration pointer.
Sourcepub fn sweep_scanline<SL: Scanline>(&mut self, sl: &mut SL) -> bool
pub fn sweep_scanline<SL: Scanline>(&mut self, sl: &mut SL) -> bool
Sweep the next stored scanline into an output scanline container.
pub fn min_x(&self) -> i32
pub fn min_y(&self) -> i32
pub fn max_x(&self) -> i32
pub fn max_y(&self) -> i32
pub fn num_scanlines(&self) -> usize
Sourcepub fn scanline_y(&self, idx: usize) -> i32
pub fn scanline_y(&self, idx: usize) -> i32
Get the Y coordinate for a stored scanline by index.
Sourcepub fn scanline_num_spans(&self, idx: usize) -> u32
pub fn scanline_num_spans(&self, idx: usize) -> u32
Get the number of spans for a stored scanline.
Sourcepub fn embedded_spans(
&self,
sl_idx: usize,
) -> impl Iterator<Item = EmbeddedBinSpan> + '_
pub fn embedded_spans( &self, sl_idx: usize, ) -> impl Iterator<Item = EmbeddedBinSpan> + '_
Iterate over embedded spans for boolean algebra.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScanlineStorageBin
impl RefUnwindSafe for ScanlineStorageBin
impl Send for ScanlineStorageBin
impl Sync for ScanlineStorageBin
impl Unpin for ScanlineStorageBin
impl UnsafeUnpin for ScanlineStorageBin
impl UnwindSafe for ScanlineStorageBin
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