Type Alias exr::meta::attribute::DisplayWindow
source · pub type DisplayWindow = IntegerBounds;Expand description
The integer rectangle limiting which part of the infinite 2D global space should be displayed.
Aliased Type§
struct DisplayWindow {
pub position: Vec2<i32>,
pub size: Vec2<usize>,
}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 ==.