pub enum Format {
Alpha,
Subpixel,
CustomSubpixel([f32; 3]),
}
Expand description
The desired output image format for rendering.
Variants§
Alpha
8-bit alpha mask.
Subpixel
32-bit RGBA subpixel mask with 1/3 pixel offsets for the red and blue channels.
CustomSubpixel([f32; 3])
32-bit RGBA subpixel mask with custom offsets.
Implementations§
source§impl Format
impl Format
sourcepub fn subpixel_bgra() -> Self
pub fn subpixel_bgra() -> Self
Creates a format for BGRA subpixel rendering.
sourcepub fn buffer_size(self, width: u32, height: u32) -> usize
pub fn buffer_size(self, width: u32, height: u32) -> usize
Returns the necessary buffer size to hold an image of the specified width and height with this format.
Trait Implementations§
impl Copy for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)