pub struct PixelBand<'a> { /* private fields */ }Expand description
Zero-copy borrowed horizontal row band of a Framebuffer enabling safe multi-threaded parallel rasterization.
Implementations§
Source§impl<'a> PixelBand<'a>
Zero-copy band rasterization primitives for PixelBand.
impl<'a> PixelBand<'a>
Zero-copy band rasterization primitives for PixelBand.
Sourcepub fn row_slice_mut(&mut self, y: u32) -> Option<&mut [u8]>
pub fn row_slice_mut(&mut self, y: u32) -> Option<&mut [u8]>
Sourcepub fn clear(&mut self, color: Color)
pub fn clear(&mut self, color: Color)
Fills the entire band with solid color using 64-bit wide stores.
§Arguments
&Self- Mutable pixel band.Color- Clear color.
Sourcepub fn fill_span(&mut self, x0: u32, x1: u32, y: u32, color: Color)
pub fn fill_span(&mut self, x0: u32, x1: u32, y: u32, color: Color)
Fills or Porter-Duff blends horizontal span [x0, x1) on global row y.
§Arguments
&Self- Mutable pixel band.u32- Inclusive start X coordinate.u32- Exclusive end X coordinate.u32- Global physical Y coordinate.Color- Foreground RGBA color.
Sourcepub fn fill_span_linear(&mut self, x0: u32, x1: u32, y: u32, color: Color)
pub fn fill_span_linear(&mut self, x0: u32, x1: u32, y: u32, color: Color)
Fills or LUT linear-light blends horizontal span [x0, x1) on global row y.
§Arguments
&Self- Mutable pixel band.u32- Inclusive start X coordinate.u32- Exclusive end X coordinate.u32- Global physical Y coordinate.Color- Foreground RGBA color.
Sourcepub fn fill_span_linear_luts(
&mut self,
x0: u32,
x1: u32,
y: u32,
luts: &([u8; 256], [u8; 256], [u8; 256], [u8; 256]),
)
pub fn fill_span_linear_luts( &mut self, x0: u32, x1: u32, y: u32, luts: &([u8; 256], [u8; 256], [u8; 256], [u8; 256]), )
Composites horizontal span [x0, x1) on global row y using precomputed bit-exact 256-entry linear-light channel LUTs.
§Arguments
&Self- Mutable pixel band.u32- Inclusive start X coordinate.u32- Exclusive end X coordinate.u32- Global physical Y coordinate.&([u8; 256], [u8; 256], [u8; 256], [u8; 256])- Precomputed per-channel lookup tables.
Sourcepub fn blend_shadow_span_const_alpha(
&mut self,
x0: u32,
x1: u32,
y: u32,
color: Color,
alpha_f: f32,
)
pub fn blend_shadow_span_const_alpha( &mut self, x0: u32, x1: u32, y: u32, color: Color, alpha_f: f32, )
Composites a constant-opacity horizontal shadow span [x0, x1) on global row y with L1 LUT linear light and IGN dithering.
§Arguments
&Self- Mutable pixel band.u32- Inclusive start X coordinate.u32- Exclusive end X coordinate.u32- Global physical Y coordinate.Color- Shadow tint RGB.f32- Continuous shadow opacity in[0.0, 1.0].
Sourcepub fn blend_glyph_row(
&mut self,
dx: u32,
dy: u32,
coverage: &[u8],
color: Color,
) -> usize
pub fn blend_glyph_row( &mut self, dx: u32, dy: u32, coverage: &[u8], color: Color, ) -> usize
Blends a contiguous glyph alpha coverage row onto global row dy starting at dx.
§Arguments
&Self- Mutable pixel band.u32- Destination starting X coordinate.u32- Global destination Y coordinate.&[u8]- Glyph alpha coverage slice.Color- Foreground text color.
§Returns
usize- Number of non-zero coverage pixels shaded.
Sourcepub fn blend_pixel(&mut self, x: u32, y: u32, color: Color)
pub fn blend_pixel(&mut self, x: u32, y: u32, color: Color)
Blends color over global pixel (x, y) using fast integer Porter-Duff source-over.
§Arguments
&Self- Mutable pixel band.u32- X pixel coordinate.u32- Global Y pixel coordinate.Color- Foreground color.
Sourcepub fn blend_pixel_linear_dithered(
&mut self,
x: u32,
y: u32,
color: Color,
dither: f32,
)
pub fn blend_pixel_linear_dithered( &mut self, x: u32, y: u32, color: Color, dither: f32, )
Blends color over global pixel (x, y) using L1 LUT linear-light compositing with optional sub-LSB dithering.
§Arguments
&Self- Mutable pixel band.u32- X pixel coordinate.u32- Global Y pixel coordinate.Color- Foreground color.f32- Normalized dither offset in[-0.5, 0.5].
Sourcepub fn blend_pixel_f32_dithered(
&mut self,
x: u32,
y: u32,
color: Color,
alpha_f: f32,
dither: f32,
)
pub fn blend_pixel_f32_dithered( &mut self, x: u32, y: u32, color: Color, alpha_f: f32, dither: f32, )
Blends a foreground RGB color with continuous floating-point opacity alpha_f onto global pixel (x, y) via L1 LUT linear light.
§Arguments
&Self- Mutable pixel band.u32- X pixel coordinate.u32- Global Y pixel coordinate.Color- Foreground RGB tint.f32- Continuous opacity in[0.0, 1.0].f32- Normalized dither offset in[-0.5, 0.5].