[−][src]Struct signed_distance_field::binary_image::BinaryByteImage
An image which is described by a slice of bytes with one byte per pixel. To determine if a byte is inside or outside, it is compared to a threshold. The default threshold is 127.
Methods
impl<'b> BinaryByteImage<'b>
[src]
pub fn from_slice(width: u16, height: u16, buffer: &'b [u8]) -> Self
[src]
Create a binary byte image with a threshold of 127
pub fn from_slice_with_threshold(
width: u16,
height: u16,
buffer: &'b [u8],
threshold: u8
) -> Self
[src]
width: u16,
height: u16,
buffer: &'b [u8],
threshold: u8
) -> Self
Create a binary byte image from the buffer with all pixels brighter than the threshold being inside-the-shape.
Trait Implementations
impl<'_> BinaryImage for BinaryByteImage<'_>
[src]
Auto Trait Implementations
impl<'b> Send for BinaryByteImage<'b>
impl<'b> Sync for BinaryByteImage<'b>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,