Struct usvg::filter::ConvolveMatrixData
source · [−]pub struct ConvolveMatrixData { /* private fields */ }
Expand description
A convolve matrix representation.
Used primarily by ConvolveMatrix
.
Implementations
sourceimpl ConvolveMatrixData
impl ConvolveMatrixData
sourcepub fn new(
target_x: u32,
target_y: u32,
columns: u32,
rows: u32,
data: Vec<f64>
) -> Option<Self>
pub fn new(
target_x: u32,
target_y: u32,
columns: u32,
rows: u32,
data: Vec<f64>
) -> Option<Self>
Creates a new ConvolveMatrixData
.
Returns None
when:
columns
*rows
!=data.len()
target_x
>=columns
target_y
>=rows
sourcepub fn columns(&self) -> u32
pub fn columns(&self) -> u32
Returns a number of columns in the matrix.
Part of the order
attribute in the SVG.
sourcepub fn rows(&self) -> u32
pub fn rows(&self) -> u32
Returns a number of rows in the matrix.
Part of the order
attribute in the SVG.
Trait Implementations
sourceimpl Clone for ConvolveMatrixData
impl Clone for ConvolveMatrixData
sourcefn clone(&self) -> ConvolveMatrixData
fn clone(&self) -> ConvolveMatrixData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ConvolveMatrixData
impl Send for ConvolveMatrixData
impl Sync for ConvolveMatrixData
impl Unpin for ConvolveMatrixData
impl UnwindSafe for ConvolveMatrixData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more