Started implementation on text mode

This commit is contained in:
Jurn Wubben 2025-09-25 22:57:20 +02:00
parent be3fd25fcf
commit 9710e81ac1

View file

@ -21,11 +21,20 @@ pub enum BARType {
EAN13 = 0x43,
UPCA = 0x41,
}
pub enum ImageOrientation {
Preserve,
Largest,
}
#[repr(u8)]
pub enum JustifyOrientation {}
#[repr(u8)]
pub enum TextEffect {
DoubleHeight = 16,
Bold = 8,
DoubleWidth = 32,
Justify(JustifyOrientation) = b'a',
}
pub struct Job {
pub ready: bool,
@ -46,6 +55,11 @@ impl Job {
}
}
pub fn write_feed(&mut self, amount: Option<u8>) -> () {
let amount = amount.unwrap_or(1);
self.content.extend_from_slice(&[0x1B, b'd', amount])
}
// pub fn write_text(&mut self, text: String, )
pub fn write_bitmap(
&mut self,
img: &DynamicImage,