pub struct Graphic {
pub width: u32,
pub height: u32,
pub rows: String,
}Expand description
A GROB’s picture: width by height pixels, rows the pixels packed
one bit each as hex digits (two per byte), every row starting on a
byte, the leftmost pixel in the most significant bit, 1 dark: the
page’s frame layout, so a picture is drawn like the screen.
Fields§
§width: u32Pixels per row.
height: u32Rows.
rows: StringThe packed rows, hex.
Implementations§
Source§impl Graphic
impl Graphic
Sourcepub fn from_packed(
width: u32,
height: u32,
packed: &[u8],
) -> Result<Graphic, Error>
pub fn from_packed( width: u32, height: u32, packed: &[u8], ) -> Result<Graphic, Error>
The picture of width by height pixels whose rows are packed
as the page’s frame packs them (one bit a pixel, every row starting
on a byte, the leftmost pixel in the most significant bit, 1 dark);
bits beyond the width are dropped. An error when the size is 0, too
large, or packed is not that long.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Graphic
impl<'de> Deserialize<'de> for Graphic
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Graphic
impl StructuralPartialEq for Graphic
Auto Trait Implementations§
impl Forget for Graphic
impl Freeze for Graphic
impl RefUnwindSafe for Graphic
impl Send for Graphic
impl Sync for Graphic
impl Unpin for Graphic
impl UnsafeUnpin for Graphic
impl UnwindSafe for Graphic
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