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]

pub fn version(self, major: u32, minor: u32) -> Self[src]

Sets the version of the created image.

pub fn format(self, format: ImageFormat) -> Self[src]

Sets the format of the created image.

pub fn flags(self, flags: ImageFlags) -> Self[src]

Sets the flags of the created image.

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]

Disables the given flag in the created image.

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]

Sets the bump scale of the created image.

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]

Sets whether to generate mipmaps.

pub fn mipmap_filter(self, filter: MipmapFilter) -> Self[src]

Sets the mipmap resize filter.

pub fn mipmap_sharpen_filter(self, filter: SharpenFilter) -> Self[src]

Sets the mipmap sharpen filter

pub fn generate_thumbnail(self, thumbnail: bool) -> Self[src]

Sets whether to generate a thumbnail.

pub fn compute_reflectivity(self, reflectivity: bool) -> Self[src]

Sets whether to compute the reflectivity of the image.

pub fn resize(self, resize: bool) -> Self[src]

Sets whether to resize the input image.

pub fn resize_method(self, method: ResizeMethod) -> Self[src]

Sets the resize method.

pub fn resize_filter(self, filter: MipmapFilter) -> Self[src]

Sets the resize filter.

pub fn resize_sharpen_filter(self, filter: MipmapFilter) -> Self[src]

Sets the resize sharpen filter.

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]

Sets the dimensions to clamp the resize to.

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]

Convert the input image into a normal map.

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]

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]

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, 

impl<'a, 'b, 'c> !UnwindSafe for Rgba8888ImageBuilder<'a, 'b, 'c>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.