Started implementation on text mode
This commit is contained in:
parent
be3fd25fcf
commit
9710e81ac1
1 changed files with 15 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue