Struct LineIndex
pub struct LineIndex { pub layer: usize, pub channel: usize, pub level: Vec2<usize>, pub position: Vec2<usize>, pub sample_count: usize }
Specifies where a row of pixels lies inside an image. This is a globally unique identifier which includes the layer, channel index, and pixel location.
Fields
layer: usizeIndex of the layer.
channel: usizeThe channel index of the layer.
level: Vec2<usize>Index of the mip or rip level in the image.
position: Vec2<usize>Position of the most left pixel of the row.
sample_count: usizeThe width of the line; the number of samples in this row, that is, the number of f16, f32, or u32 values.
Implementations
impl LineIndex
fn lines_in_block(block: BlockIndex, channels: &ChannelList) -> impl Iterator<Item = (Range<usize>, LineIndex)>Iterates the lines of this block index in interleaved fashion: For each line in this block, this iterator steps once through each channel. This is how lines are stored in a pixel data block.
Does not check whether
self.layer_index,self.level,self.sizeandself.positionare valid indices.__
Trait Implementations
impl Clone for LineIndex
fn clone(&self) -> Self
impl Copy for LineIndex
impl Debug for LineIndex
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for LineIndex
impl Hash for LineIndex
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for LineIndex
fn eq(&self, other: &Self) -> bool
impl StructuralPartialEq for LineIndex
Auto Trait Implementations
impl Freeze for LineIndex
impl RefUnwindSafe for LineIndex
impl Send for LineIndex
impl Sync for LineIndex
impl Unpin for LineIndex
impl UnsafeUnpin for LineIndex
impl UnwindSafe for LineIndex
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for LineIndex
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for LineIndex
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for LineIndex
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for LineIndex
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for LineIndex
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for LineIndex
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for LineIndex
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for LineIndex
const ALIGN: usize = _;type Init = T;unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> Read<Exclusive, BecauseExclusive> for LineIndex
where
T: ?Sized,
impl<T> ToOwned for LineIndex
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for LineIndex
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for LineIndex
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for LineIndex
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>