use crate::{
common::{BitMatrix, DetectorRXingResult},
Point,
};
pub struct AztecDetectorRXingResult {
bits: BitMatrix,
points: [Point; 4],
compact: bool,
nbDatablocks: u32,
nbLayers: u32,
}
impl DetectorRXingResult for AztecDetectorRXingResult {
fn getBits(&self) -> &BitMatrix {
&self.bits
}
fn getPoints(&self) -> &[Point] {
&self.points
}
}
impl AztecDetectorRXingResult {
pub fn new(
bits: BitMatrix,
points: [Point; 4],
compact: bool,
nbDatablocks: u32,
nbLayers: u32,
) -> Self {
Self {
bits,
points,
compact,
nbDatablocks,
nbLayers,
}
}
pub fn getNbLayers(&self) -> u32 {
self.nbLayers
}
pub fn getNbDatablocks(&self) -> u32 {
self.nbDatablocks
}
pub fn isCompact(&self) -> bool {
self.compact
}
}