add point(x: f32, y: f32) function

Shorter than writing `Point::new`
This commit is contained in:
Vukašin Stepanović
2023-02-16 11:20:03 +00:00
parent 868a9b26de
commit 39b4866e47
22 changed files with 113 additions and 109 deletions

View File

@@ -18,7 +18,7 @@ use rxing_one_d_proc_derive::OneDReader;
use crate::{
common::{BitArray, Result},
BarcodeFormat, DecodeHintValue, Exceptions, Point, RXingResult,
point, BarcodeFormat, DecodeHintValue, Exceptions, RXingResult,
};
use super::{one_d_reader, OneDReader};
@@ -150,8 +150,8 @@ impl OneDReader for ITFReader {
&resultString,
Vec::new(), // no natural byte representation for these barcodes
vec![
Point::new(startRange[1] as f32, rowNumber as f32),
Point::new(endRange[0] as f32, rowNumber as f32),
point(startRange[1] as f32, rowNumber as f32),
point(endRange[0] as f32, rowNumber as f32),
],
BarcodeFormat::ITF,
);