pub struct Example<'a> { /* private fields */ }
Expand description
An example to be used in texture generation
Implementations§
Source§impl<'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§
Source§impl<'a> From<ExampleBuilder<'a>> for Example<'a>
impl<'a> From<ExampleBuilder<'a>> for Example<'a>
Source§fn from(eb: ExampleBuilder<'a>) -> Self
fn from(eb: ExampleBuilder<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for Example<'a>
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§
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