pub struct LineImagePatternPow2<F: PatternFilter> { /* private fields */ }Expand description
Power-of-2 optimized image pattern for line rendering.
Port of C++ line_image_pattern_pow2<Filter>.
Uses bit masking instead of modulo for pattern wrapping.
Implementations§
Source§impl<F: PatternFilter> LineImagePatternPow2<F>
impl<F: PatternFilter> LineImagePatternPow2<F>
pub fn new() -> Self
pub fn with_source<S: ImagePatternSource>(src: &S) -> Self
pub fn create<S: ImagePatternSource>(&mut self, src: &S)
pub fn pattern_width(&self) -> i32
pub fn line_width(&self) -> i32
pub fn width(&self) -> f64
pub fn pixel(&self, p: &mut Rgba8, x: i32, y: i32)
Trait Implementations§
Source§impl<F: PatternFilter> ImageLinePattern for LineImagePatternPow2<F>
impl<F: PatternFilter> ImageLinePattern for LineImagePatternPow2<F>
Source§fn pattern_width(&self) -> i32
fn pattern_width(&self) -> i32
Pattern width in subpixel coordinates (for repeating).
Source§fn line_width(&self) -> i32
fn line_width(&self) -> i32
Line width in subpixel coordinates (half-height of pattern).
Auto Trait Implementations§
impl<F> Freeze for LineImagePatternPow2<F>
impl<F> RefUnwindSafe for LineImagePatternPow2<F>where
F: RefUnwindSafe,
impl<F> Send for LineImagePatternPow2<F>where
F: Send,
impl<F> Sync for LineImagePatternPow2<F>where
F: Sync,
impl<F> Unpin for LineImagePatternPow2<F>where
F: Unpin,
impl<F> UnwindSafe for LineImagePatternPow2<F>where
F: UnwindSafe,
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