pub struct ConstantBorder {
pub left: u32,
pub top: u32,
pub color: [u8; 3],
}Expand description
Represents a constant border around an image.
This is used to specify the border around an image when copying a constant border around it for the purposes of letterbox resizing.
Fields§
§left: u32§top: u32§color: [u8; 3]Implementations§
Source§impl ConstantBorder
impl ConstantBorder
Sourcepub fn new(left: u32, top: u32, color: [u8; 3]) -> Self
pub fn new(left: u32, top: u32, color: [u8; 3]) -> Self
New constant border.
§Arguments
left- Size of border on the left and right sides of the image in number of pixels.top- Size of border on the top and bottom sides of the image in number of pixels.color- Color of border (RGB).
Trait Implementations§
Source§impl Clone for ConstantBorder
impl Clone for ConstantBorder
Source§fn clone(&self) -> ConstantBorder
fn clone(&self) -> ConstantBorder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConstantBorder
impl Debug for ConstantBorder
Source§impl PartialEq for ConstantBorder
impl PartialEq for ConstantBorder
impl StructuralPartialEq for ConstantBorder
Auto Trait Implementations§
impl Freeze for ConstantBorder
impl RefUnwindSafe for ConstantBorder
impl Send for ConstantBorder
impl Sync for ConstantBorder
impl Unpin for ConstantBorder
impl UnwindSafe for ConstantBorder
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