[][src]Struct signed_distance_field::binary_image::BinaryByteImage

pub struct BinaryByteImage<'b> { /* fields omitted */ }

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]

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]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.