mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
writer test pass
This commit is contained in:
@@ -72,7 +72,7 @@ impl BarcodeMatrix {
|
||||
}
|
||||
|
||||
pub fn getScaledMatrix(&self, xScale: usize, yScale: usize) -> Vec<Vec<u8>> {
|
||||
let mut matrixOut = vec![vec![0; self.height * yScale]; self.width * xScale];
|
||||
let mut matrixOut = vec![vec![0; self.width * xScale]; self.height * yScale];
|
||||
// byte[][] matrixOut = new byte[height * yScale][width * xScale];
|
||||
let yMax = self.height * yScale;
|
||||
for i in 0..yMax {
|
||||
@@ -4,8 +4,8 @@ pub use compaction::*;
|
||||
mod barcode_row;
|
||||
pub use barcode_row::*;
|
||||
|
||||
mod barcode_batrix;
|
||||
pub use barcode_batrix::*;
|
||||
mod barcode_matrix;
|
||||
pub use barcode_matrix::*;
|
||||
|
||||
mod dimensions;
|
||||
pub use dimensions::*;
|
||||
|
||||
@@ -181,7 +181,7 @@ pub fn generateErrorCorrection(
|
||||
) -> Result<String, Exceptions> {
|
||||
let k = getErrorCorrectionCodewordCount(errorCorrectionLevel)?;
|
||||
let mut e = vec![0 as char; k as usize]; //new char[k];
|
||||
let sld = dataCodewords.len();
|
||||
let sld = dataCodewords.chars().count();
|
||||
for i in 0..sld {
|
||||
// for (int i = 0; i < sld; i++) {
|
||||
let t1 = (dataCodewords.chars().nth(i).unwrap() as u32 + e[e.len() - 1] as u32) % 929;
|
||||
|
||||
Reference in New Issue
Block a user