Skip to main content

PixfmtRgba32CompOp

Struct PixfmtRgba32CompOp 

Source
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>

Source

pub fn new(rbuf: &'a mut RowAccessor) -> Self

Source

pub fn new_with_op(rbuf: &'a mut RowAccessor, op: CompOp) -> Self

Source

pub fn comp_op(&self) -> CompOp

Source

pub fn set_comp_op(&mut self, op: CompOp)

Source

pub fn clear(&mut self, c: &Rgba8)

Clear the entire buffer to a solid color.

Trait Implementations§

Source§

impl<'a> PixelFormat for PixfmtRgba32CompOp<'a>

Source§

type ColorType = Rgba8

Source§

fn width(&self) -> u32

Source§

fn height(&self) -> u32

Source§

fn pixel(&self, x: i32, y: i32) -> Rgba8

Get the pixel color at (x, y).
Source§

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)

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)

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)

Blend a horizontal line of len pixels at (x, y) with uniform color and coverage.
Source§

fn blend_solid_hspan( &mut self, x: i32, y: i32, len: u32, c: &Rgba8, covers: &[CoverType], )

Blend a horizontal span of len pixels with per-pixel coverage values.
Source§

fn blend_color_hspan( &mut self, x: i32, y: i32, len: u32, colors: &[Rgba8], covers: &[CoverType], cover: CoverType, )

Blend a horizontal span with per-pixel colors and optional per-pixel coverage. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.