Struct async_cuda_npp::constant_border::ConstantBorder
source · 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 copy 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<ConstantBorder> for ConstantBorder
impl PartialEq<ConstantBorder> for ConstantBorder
source§fn eq(&self, other: &ConstantBorder) -> bool
fn eq(&self, other: &ConstantBorder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ConstantBorder
Auto Trait Implementations§
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