mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 21:02:35 +00:00
port datamatrix detector
This commit is contained in:
19
src/datamatrix/detector/datamatrix_result.rs
Normal file
19
src/datamatrix/detector/datamatrix_result.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use crate::{common::{DetectorRXingResult, BitMatrix}, RXingResultPoint};
|
||||
|
||||
pub struct DatamatrixDetectorResult(BitMatrix,Vec<RXingResultPoint>);
|
||||
|
||||
impl DatamatrixDetectorResult {
|
||||
pub fn new(bits:BitMatrix, points:Vec<RXingResultPoint>)->Self {
|
||||
Self(bits,points)
|
||||
}
|
||||
}
|
||||
|
||||
impl DetectorRXingResult for DatamatrixDetectorResult {
|
||||
fn getBits(&self) -> &BitMatrix {
|
||||
&self.0
|
||||
}
|
||||
|
||||
fn getPoints(&self) -> &Vec<RXingResultPoint> {
|
||||
&self.1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user