pub struct PFMBuilder(/* private fields */);
Expand description
Provides the tool to create PFM struct, and fill in all needed information by hand.
Implementations§
Source§impl PFMBuilder
impl PFMBuilder
Sourcepub fn new() -> PFMBuilder
pub fn new() -> PFMBuilder
Creates an empty PFM struct.
Sourcepub fn size(self, width: usize, height: usize) -> PFMBuilder
pub fn size(self, width: usize, height: usize) -> PFMBuilder
Set width and height of the PFM file.
Sourcepub fn color(self, color: bool) -> PFMBuilder
pub fn color(self, color: bool) -> PFMBuilder
Set if it’s a RGB or monochrome image.
Sourcepub fn scale(self, scale: f32) -> PFMBuilder
pub fn scale(self, scale: f32) -> PFMBuilder
Set the scaling factor and endianness.
Sourcepub fn data(self, data: Vec<f32>) -> PFMBuilder
pub fn data(self, data: Vec<f32>) -> PFMBuilder
Set the pixel data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PFMBuilder
impl RefUnwindSafe for PFMBuilder
impl Send for PFMBuilder
impl Sync for PFMBuilder
impl Unpin for PFMBuilder
impl UnwindSafe for PFMBuilder
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