mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
mqr tests pass
This commit is contained in:
@@ -1023,8 +1023,8 @@ pub fn SampleMQR(image: &BitMatrix, fp: ConcentricPattern) -> Result<QRCodeDetec
|
||||
dim,
|
||||
dim,
|
||||
&[SamplerControl {
|
||||
p0: point_i(0, dim as u32),
|
||||
p1: point_i(0, dim as u32),
|
||||
p1: point_i(dim as u32, dim as u32),
|
||||
p0: point_i(0, 0),
|
||||
transform: bestPT,
|
||||
}],
|
||||
)?;
|
||||
|
||||
@@ -113,6 +113,9 @@ impl Version {
|
||||
}
|
||||
|
||||
pub fn getECBlocksForLevel(&self, ecLevel: ErrorCorrectionLevel) -> &ECBlocks {
|
||||
if ecLevel.get_ordinal() as usize >= self.ecBlocks.len() {
|
||||
return &self.ecBlocks[ecLevel.get_ordinal() as usize % self.ecBlocks.len()];
|
||||
}
|
||||
&self.ecBlocks[ecLevel.get_ordinal() as usize]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user