1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! P-Touch Printer Driver
//!
//! This crate provides a printer driver for Brother P-Touch QL series label printers.
//!
//! # Example
//!
//! ```rust,no_run
//! use ptouch::{Config, ContinuousType, Media, Model, Printer};
//!
//! let media = Media::Continuous(ContinuousType::Continuous29);
//! let model = Model::QL820NWB;
//! let config = Config::new(model, "serial".to_string(), media);
//! let printer = Printer::new(config).unwrap();
//! ```
pub use crate::;
/// Type alias for 1-bit bitmap data used by printers.
///
/// Each inner `Vec<u8>` represents a single row of pixels, with 8 pixels
/// packed into each byte. The outer Vec represents multiple rows.
///
/// For normal printers: each row should be 90 bytes (720 pixels / 8)
/// For wide printers: each row should be 162 bytes (1296 pixels / 8)
pub type Matrix = ;
/// Width in pixels for normal P-Touch printers (QL-720NW, QL-800, QL-820NWB).
///
/// Normal printers use 720 pixels across the tape width, requiring
/// 90 bytes per row when packed into bitmap format (720 / 8 = 90).
pub const NORMAL_PRINTER_WIDTH: u32 = 720;
/// Width in pixels for wide P-Touch printers (QL-1100 series).
///
/// Wide printers use 1296 pixels across the tape width, requiring
/// 162 bytes per row when packed into bitmap format (1296 / 8 = 162).
pub const WIDE_PRINTER_WIDTH: u32 = 1296;