pub struct MTSDF { /* private fields */ }
Expand description
A multi-channel signed distance field with true distance. Backed by a four-channel f32 image.
Trait Implementations§
Source§impl SDFTrait for MTSDF
impl SDFTrait for MTSDF
type Image = ImageBuffer<Rgba<f32>, Vec<f32>>
type ColoredOutput = ImageBuffer<Rgba<f32>, Vec<f32>>
Source§fn from_image(image: Self::Image, range: f64, mid_value: f32) -> Self
fn from_image(image: Self::Image, range: f64, mid_value: f32) -> Self
Create an SDF from an image.
Source§fn render(&self, width: u32, height: u32) -> GrayFImage
fn render(&self, width: u32, height: u32) -> GrayFImage
Render this SDF to a single-channel float image of specified size.
Source§fn render_colored(&self, width: u32, height: u32) -> Self::ColoredOutput
fn render_colored(&self, width: u32, height: u32) -> Self::ColoredOutput
Render this SDF to a multi-channel float image of specified size. Colors represent MSDF
edge colors.
Auto Trait Implementations§
impl Freeze for MTSDF
impl RefUnwindSafe for MTSDF
impl Send for MTSDF
impl Sync for MTSDF
impl Unpin for MTSDF
impl UnwindSafe for MTSDF
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more