Struct jxl_render::Region
source · pub struct Region {
pub left: i32,
pub top: i32,
pub width: u32,
pub height: u32,
}Fields§
§left: i32§top: i32§width: u32§height: u32Implementations§
source§impl Region
impl Region
pub fn empty() -> Self
pub fn with_size(width: u32, height: u32) -> Self
pub fn is_empty(self) -> bool
pub fn right(self) -> i32
pub fn bottom(self) -> i32
pub fn contains(self, target: Region) -> bool
pub fn translate(self, x: i32, y: i32) -> Self
pub fn intersection(self, rhs: Region) -> Self
pub fn merge(self, other: Self) -> Self
pub fn pad(self, size: u32) -> Self
pub fn downsample(self, factor: u32) -> Self
pub fn downsample_separate(self, factor_x: u32, factor_y: u32) -> Self
pub fn upsample(self, factor: u32) -> Self
pub fn upsample_separate(self, factor_x: u32, factor_y: u32) -> Self
Trait Implementations§
source§impl PartialEq for Region
impl PartialEq for Region
impl Copy for Region
impl Eq for Region
impl StructuralPartialEq for Region
Auto Trait Implementations§
impl RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
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, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
source§fn default_with_context(_: Ctx) -> T
fn default_with_context(_: Ctx) -> T
Creates a default value with the given context.