pub struct Mabel {
pub size: u8,
pub width: Option<u32>,
pub height: Option<u32>,
pub palette: Palette,
pub pixels: Vec<Vec<Pixel>>,
}Fields§
§size: u8§width: Option<u32>§height: Option<u32>§palette: Palette§pixels: Vec<Vec<Pixel>>Implementations§
Source§impl Mabel
impl Mabel
pub fn new( size: u8, width: Option<u32>, height: Option<u32>, palette: Palette, pixels: Vec<Vec<Pixel>>, ) -> Self
pub fn from_file(path: &str) -> Result<Self>
pub fn from(eno: &Document) -> Result<Self>
pub fn save_png(&self, path: &str) -> Result<()>
pub fn height(&self) -> u32
pub fn width(&self) -> u32
pub fn pixels_height(&self) -> u32
pub fn pixels_width(&self) -> u32
pub fn image_height(&self) -> u32
pub fn image_width(&self) -> u32
pub fn is_over_width(&self) -> bool
pub fn is_over_height(&self) -> bool
pub fn palette(&self) -> Vec<u8> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mabel
impl RefUnwindSafe for Mabel
impl Send for Mabel
impl Sync for Mabel
impl Unpin for Mabel
impl UnwindSafe for Mabel
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