mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
swap point_f and point functions
This commit is contained in:
@@ -21,7 +21,7 @@ use crate::{
|
||||
BitMatrix, DefaultGridSampler, GridSampler, Quadrilateral, Result,
|
||||
},
|
||||
exceptions::Exceptions,
|
||||
point, Point,
|
||||
point_f, Point,
|
||||
};
|
||||
|
||||
use super::aztec_detector_result::AztecDetectorRXingResult;
|
||||
@@ -320,10 +320,10 @@ impl<'a> Detector<'_> {
|
||||
|
||||
// Expand the square by .5 pixel in each direction so that we're on the border
|
||||
// between the white square and the black square
|
||||
let pinax = point(pina.x + 0.5, pina.y - 0.5);
|
||||
let pinbx = point(pinb.x + 0.5, pinb.y + 0.5);
|
||||
let pincx = point(pinc.x - 0.5, pinc.y + 0.5);
|
||||
let pindx = point(pind.x - 0.5, pind.y - 0.5);
|
||||
let pinax = point_f(pina.x + 0.5, pina.y - 0.5);
|
||||
let pinbx = point_f(pinb.x + 0.5, pinb.y + 0.5);
|
||||
let pincx = point_f(pinc.x - 0.5, pinc.y + 0.5);
|
||||
let pindx = point_f(pind.x - 0.5, pind.y - 0.5);
|
||||
|
||||
// Expand the square so that its corners are the centers of the points
|
||||
// just outside the bull's eye.
|
||||
@@ -463,10 +463,10 @@ impl<'a> Detector<'_> {
|
||||
let high = dimension as f32 / 2.0 + self.nb_center_layers as f32;
|
||||
|
||||
let dst = Quadrilateral::new(
|
||||
point(low, low),
|
||||
point(high, low),
|
||||
point(high, high),
|
||||
point(low, high),
|
||||
point_f(low, low),
|
||||
point_f(high, low),
|
||||
point_f(high, high),
|
||||
point_f(low, high),
|
||||
);
|
||||
|
||||
let (res, _) = sampler.sample_grid_detailed(image, dimension, dimension, dst, quad)?;
|
||||
|
||||
Reference in New Issue
Block a user