Skip to main content

Dst

Struct Dst 

Source
pub struct Dst<'a> {
    pub x0: i32,
    pub y0: i32,
    pub x1: i32,
    pub y1: i32,
    /* private fields */
}
Expand description

the destination pixels of one render call: row k holds the pixels x0..x1 of row y0 + k

Fields§

§x0: i32§y0: i32§x1: i32§y1: i32

Implementations§

Source§

impl<'a> Dst<'a>

Source

pub fn new(roi: [i32; 4], rows: Vec<&'a mut [u8]>) -> Dst<'a>

a destination from row slices (each (x1 - x0) * 4 bytes, y1 - y0 of them)

Source

pub fn strided(roi: [i32; 4], buf: &'a mut [u8], stride: usize) -> Dst<'a>

a destination in one buffer: row y0 + k at k * stride (e.g. a tile buffer with stride (x1 - x0) * 4)

Source

pub fn of_surface(sf: &'a mut Surface, roi: [i32; 4]) -> Dst<'a>

the rectangle of a surface (clamped to it) as one destination

Source

pub fn row(&mut self, y: i32) -> &mut [u8] ⓘ

the pixels x0..x1 of row y (y0 <= y < y1)

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for Dst<'a>

§

impl<'a> Forget for Dst<'a>

§

impl<'a> Freeze for Dst<'a>

§

impl<'a> RefUnwindSafe for Dst<'a>

§

impl<'a> Send for Dst<'a>

§

impl<'a> Sync for Dst<'a>

§

impl<'a> Unpin for Dst<'a>

§

impl<'a> UnsafeUnpin for Dst<'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 = !

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

fn try_from(value: U) -> Result<T, !>

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.