pub struct PixfmtRgba32CompOp<'a> { /* private fields */ }Expand description
RGBA32 pixel format with runtime-selectable SVG compositing operations.
Port of C++ pixfmt_custom_blend_rgba<comp_op_adaptor_rgba<rgba8, order_rgba>, rendering_buffer>.
Wraps a RowAccessor and stores the current compositing operation.
All blending is dispatched through comp_op_blend().
Implementations§
Source§impl<'a> PixfmtRgba32CompOp<'a>
impl<'a> PixfmtRgba32CompOp<'a>
pub fn new(rbuf: &'a mut RowAccessor) -> Self
pub fn new_with_op(rbuf: &'a mut RowAccessor, op: CompOp) -> Self
pub fn comp_op(&self) -> CompOp
pub fn set_comp_op(&mut self, op: CompOp)
Trait Implementations§
Source§impl<'a> PixelFormat for PixfmtRgba32CompOp<'a>
impl<'a> PixelFormat for PixfmtRgba32CompOp<'a>
type ColorType = Rgba8
fn width(&self) -> u32
fn height(&self) -> u32
Source§fn copy_pixel(&mut self, x: i32, y: i32, c: &Rgba8)
fn copy_pixel(&mut self, x: i32, y: i32, c: &Rgba8)
Copy (overwrite) a single pixel at (x, y) with color
c.Source§fn copy_hline(&mut self, x: i32, y: i32, len: u32, c: &Rgba8)
fn copy_hline(&mut self, x: i32, y: i32, len: u32, c: &Rgba8)
Copy (overwrite) a horizontal line of
len pixels with color c.Source§fn blend_pixel(&mut self, x: i32, y: i32, c: &Rgba8, cover: CoverType)
fn blend_pixel(&mut self, x: i32, y: i32, c: &Rgba8, cover: CoverType)
Blend a single pixel at (x, y) with color
c and coverage cover.Source§fn blend_hline(&mut self, x: i32, y: i32, len: u32, c: &Rgba8, cover: CoverType)
fn blend_hline(&mut self, x: i32, y: i32, len: u32, c: &Rgba8, cover: CoverType)
Blend a horizontal line of
len pixels at (x, y) with uniform color and coverage.Auto Trait Implementations§
impl<'a> Freeze for PixfmtRgba32CompOp<'a>
impl<'a> RefUnwindSafe for PixfmtRgba32CompOp<'a>
impl<'a> !Send for PixfmtRgba32CompOp<'a>
impl<'a> !Sync for PixfmtRgba32CompOp<'a>
impl<'a> Unpin for PixfmtRgba32CompOp<'a>
impl<'a> UnsafeUnpin for PixfmtRgba32CompOp<'a>
impl<'a> !UnwindSafe for PixfmtRgba32CompOp<'a>
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