[−][src]Struct tray_rust::sampler::Region
Defines a region of the image being sampled in pixel coordinates
Fields
current: (u32, u32)
Current coordinates of the pixel to sample (x, y)
start: (u32, u32)
Coordinates of the start of region being sampled (x, y)
end: (u32, u32)
Coordinates of the end of the region being sampled (x, y)
dim: (u32, u32)
Dimensions of the region being sampled
Methods
impl Region
[src]
pub fn new(start: (u32, u32), dim: (u32, u32)) -> Region
[src]
Create a new region starting at start
with dimension dim
pub fn select_region(&mut self, start: (u32, u32))
[src]
Select a new region starting at region indices start
with the same dimensions
eg. with blocks of width 8 the 2nd region along x is at 16 so to get
this block you'd set start.0 = 2
Trait Implementations
Auto Trait Implementations
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
impl RefUnwindSafe for Region
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,