pub struct LineIndex {
pub layer: usize,
pub channel: usize,
pub level: Vec2<usize>,
pub position: Vec2<usize>,
pub sample_count: usize,
}
Expand description
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: usize
Index of the layer.
channel: usize
The 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: usize
The width of the line; the number of samples in this row, that is, the number of f16, f32, or u32 values.
Implementations§
source§impl LineIndex
impl LineIndex
sourcepub fn lines_in_block(
block: BlockIndex,
channels: &ChannelList,
) -> impl Iterator<Item = (Range<usize>, LineIndex)>
pub 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.size
and self.position
are valid indices.__
Trait Implementations§
impl Copy for LineIndex
impl Eq for LineIndex
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 UnwindSafe for LineIndex
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)