Struct vtflib::Rgba8888ImageBuilder [−][src]
#[must_use]pub struct Rgba8888ImageBuilder<'a, 'b, 'c> { /* fields omitted */ }
Expand description
A builder for an image from existing RGBA8888 data.
Implementations
impl<'a, 'b, 'c> Rgba8888ImageBuilder<'a, 'b, 'c>
[src]
impl<'a, 'b, 'c> Rgba8888ImageBuilder<'a, 'b, 'c>
[src]pub fn format(self, format: ImageFormat) -> Self
[src]
pub fn format(self, format: ImageFormat) -> Self
[src]Sets the format of the created image.
pub fn flags(self, flags: ImageFlags) -> Self
[src]
pub fn flags(self, flags: ImageFlags) -> Self
[src]Sets the flags of the created image.
pub fn with_flag(self, flag: ImageFlags) -> Self
[src]
pub fn with_flag(self, flag: ImageFlags) -> Self
[src]Enables the given flag in the created image.
pub fn without_flag(self, flag: ImageFlags) -> Self
[src]
pub fn without_flag(self, flag: ImageFlags) -> Self
[src]Disables the given flag in the created image.
pub fn start_frame(self, frame: u32) -> Self
[src]
pub fn start_frame(self, frame: u32) -> Self
[src]Sets the start frame of the created image.
pub fn bump_scale(self, scale: f32) -> Self
[src]
pub fn bump_scale(self, scale: f32) -> Self
[src]Sets the bump scale of the created image.
pub fn reflectivity(self, reflectivity: [f32; 3]) -> Self
[src]
pub fn reflectivity(self, reflectivity: [f32; 3]) -> Self
[src]Sets the reflectivity values of the created image.
pub fn generate_mipmaps(self, mipmaps: bool) -> Self
[src]
pub fn generate_mipmaps(self, mipmaps: bool) -> Self
[src]Sets whether to generate mipmaps.
pub fn mipmap_filter(self, filter: MipmapFilter) -> Self
[src]
pub fn mipmap_filter(self, filter: MipmapFilter) -> Self
[src]Sets the mipmap resize filter.
pub fn mipmap_sharpen_filter(self, filter: SharpenFilter) -> Self
[src]
pub fn mipmap_sharpen_filter(self, filter: SharpenFilter) -> Self
[src]Sets the mipmap sharpen filter
pub fn generate_thumbnail(self, thumbnail: bool) -> Self
[src]
pub fn generate_thumbnail(self, thumbnail: bool) -> Self
[src]Sets whether to generate a thumbnail.
pub fn compute_reflectivity(self, reflectivity: bool) -> Self
[src]
pub fn compute_reflectivity(self, reflectivity: bool) -> Self
[src]Sets whether to compute the reflectivity of the image.
pub fn resize_method(self, method: ResizeMethod) -> Self
[src]
pub fn resize_method(self, method: ResizeMethod) -> Self
[src]Sets the resize method.
pub fn resize_filter(self, filter: MipmapFilter) -> Self
[src]
pub fn resize_filter(self, filter: MipmapFilter) -> Self
[src]Sets the resize filter.
pub fn resize_sharpen_filter(self, filter: MipmapFilter) -> Self
[src]
pub fn resize_sharpen_filter(self, filter: MipmapFilter) -> Self
[src]Sets the resize sharpen filter.
pub fn resize_clamp(self, clamp: bool) -> Self
[src]
pub fn resize_clamp(self, clamp: bool) -> Self
[src]Sets whether to clamp the resize size.
pub fn resize_clamp_dimensions(self, width: u32, heigth: u32) -> Self
[src]
pub fn resize_clamp_dimensions(self, width: u32, heigth: u32) -> Self
[src]Sets the dimensions to clamp the resize to.
pub fn gamma_correct(self, amount: f32) -> Self
[src]
pub fn gamma_correct(self, amount: f32) -> Self
[src]Apply gamma correction to the input image.
pub fn normal_map(self, settings: NormalMapConversionSettings) -> Self
[src]
pub fn normal_map(self, settings: NormalMapConversionSettings) -> Self
[src]Convert the input image into a normal map.
pub fn sphere_map(self, sphere_map: bool) -> Self
[src]
pub fn sphere_map(self, sphere_map: bool) -> Self
[src]Sets whether to generate a sphere map for six-faced cubemap images.
pub fn create(self, data: &mut [u8]) -> Result<()>
[src]
pub fn create(self, data: &mut [u8]) -> Result<()>
[src]Create a single frame image from data
.
Data needs to be mut
because some creation options are applied in place.
Errors
Returns Err
if data
has the wrong length or the image creation fails.
pub fn create_multi(
self,
frames: u32,
faces: u32,
slices: u32,
data: &mut [&mut [u8]]
) -> Result<()>
[src]
pub fn create_multi(
self,
frames: u32,
faces: u32,
slices: u32,
data: &mut [&mut [u8]]
) -> Result<()>
[src]Create a multi frame or cubemap image from data
.
Data needs to be mut
because some creation options are applied in place.
Errors
Returns Err
if data
has the wrong length or the image creation fails.
Auto Trait Implementations
impl<'a, 'b, 'c> RefUnwindSafe for Rgba8888ImageBuilder<'a, 'b, 'c>
impl<'a, 'b, 'c> !Send for Rgba8888ImageBuilder<'a, 'b, 'c>
impl<'a, 'b, 'c> !Sync for Rgba8888ImageBuilder<'a, 'b, 'c>
impl<'a, 'b, 'c> Unpin for Rgba8888ImageBuilder<'a, 'b, 'c> where
'a: 'c,
'b: 'c,
'a: 'c,
'b: 'c,