Struct texture_synthesis::Example
source · [−]pub struct Example<'a> { /* private fields */ }
Expand description
An example to be used in texture generation
Implementations
sourceimpl<'a> Example<'a>
impl<'a> Example<'a>
sourcepub fn builder<I: Into<ImageSource<'a>>>(img: I) -> ExampleBuilder<'a>
pub fn builder<I: Into<ImageSource<'a>>>(img: I) -> ExampleBuilder<'a>
Creates a new example builder from the specified image source
pub fn image_source(&self) -> &ImageSource<'a>
sourcepub fn new<I: Into<ImageSource<'a>>>(img: I) -> Self
pub fn new<I: Into<ImageSource<'a>>>(img: I) -> Self
Creates a new example input from the specified image source
sourcepub fn with_guide<G: Into<ImageSource<'a>>>(&mut self, guide: G) -> &mut Self
pub fn with_guide<G: Into<ImageSource<'a>>>(&mut self, guide: G) -> &mut Self
Use a guide map that describe a ‘FROM’ transformation.
Note: If any one example has a guide, then they all must have a guide, otherwise a session will not be created.
sourcepub fn set_sample_method<M: Into<SampleMethod<'a>>>(
&mut self,
method: M
) -> &mut Self
pub fn set_sample_method<M: Into<SampleMethod<'a>>>(
&mut self,
method: M
) -> &mut Self
Specify how the example image is sampled during texture generation.
By default, all pixels in the example can be sampled.
Trait Implementations
sourceimpl<'a> From<ExampleBuilder<'a>> for Example<'a>
impl<'a> From<ExampleBuilder<'a>> for Example<'a>
sourcefn from(eb: ExampleBuilder<'a>) -> Self
fn from(eb: ExampleBuilder<'a>) -> Self
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Example<'a>
impl<'a> Send for Example<'a>
impl<'a> Sync for Example<'a>
impl<'a> Unpin for Example<'a>
impl<'a> UnwindSafe for Example<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more