Struct exr::meta::attribute::IntegerBounds   
source · pub struct IntegerBounds {
    pub position: Vec2<i32>,
    pub size: Vec2<usize>,
}Expand description
A rectangular section anywhere in 2D integer space.
Valid from minimum coordinate (including) -1,073,741,822
to maximum coordinate (including) 1,073,741,822, the value of (i32::MAX/2 -1).
Fields§
§position: Vec2<i32>The top left corner of this rectangle.
The Box2I32 includes this pixel if the size is not zero.
size: Vec2<usize>How many pixels to include in this Box2I32.
Extends to the right and downwards.
Does not include the actual boundary, just like Vec::len().
Implementations§
source§impl IntegerBounds
 
impl IntegerBounds
sourcepub fn from_dimensions(size: impl Into<Vec2<usize>>) -> Self
 
pub fn from_dimensions(size: impl Into<Vec2<usize>>) -> Self
Create a box with a size starting at zero.
sourcepub fn new(start: impl Into<Vec2<i32>>, size: impl Into<Vec2<usize>>) -> Self
 
pub fn new(start: impl Into<Vec2<i32>>, size: impl Into<Vec2<usize>>) -> Self
Create a box with a size and an origin point.
sourcepub fn end(self) -> Vec2<i32>
 
pub fn end(self) -> Vec2<i32>
Returns the top-right coordinate of the rectangle.
The row and column described by this vector are not included in the rectangle,
just like Vec::len().
sourcepub fn max(self) -> Vec2<i32>
 
pub fn max(self) -> Vec2<i32>
Returns the maximum coordinate that a value in this rectangle may have.
sourcepub fn write<W: Write>(&self, write: &mut W) -> UnitResult
 
pub fn write<W: Write>(&self, write: &mut W) -> UnitResult
Without validation, write this instance to the byte stream.
sourcepub fn with_origin(self, origin: Vec2<i32>) -> Self
 
pub fn with_origin(self, origin: Vec2<i32>) -> Self
Create a new rectangle which is offset by the specified origin.
Trait Implementations§
source§impl Clone for IntegerBounds
 
impl Clone for IntegerBounds
source§fn clone(&self) -> IntegerBounds
 
fn clone(&self) -> IntegerBounds
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for IntegerBounds
 
impl Debug for IntegerBounds
source§impl Default for IntegerBounds
 
impl Default for IntegerBounds
source§fn default() -> IntegerBounds
 
fn default() -> IntegerBounds
source§impl Hash for IntegerBounds
 
impl Hash for IntegerBounds
source§impl PartialEq<IntegerBounds> for IntegerBounds
 
impl PartialEq<IntegerBounds> for IntegerBounds
source§fn eq(&self, other: &IntegerBounds) -> bool
 
fn eq(&self, other: &IntegerBounds) -> bool
self and other values to be equal, and is used
by ==.impl Copy for IntegerBounds
impl Eq for IntegerBounds
impl StructuralEq for IntegerBounds
impl StructuralPartialEq for IntegerBounds
Auto Trait Implementations§
impl RefUnwindSafe for IntegerBounds
impl Send for IntegerBounds
impl Sync for IntegerBounds
impl Unpin for IntegerBounds
impl UnwindSafe for IntegerBounds
Blanket Implementations§
source§impl<R, P> ReadPrimitive<R> for Pwhere
    R: Read + ReadEndian<P>,
    P: Default,
 
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
 
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().