mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
remove ResultPoint trait uses of Point
Point already has `x` and `y` properties, so accessing them with `getX()` and `getY()` is needlessly verbose. These calls have been removed, though the trait impl is still presen for the time being, since the OneDReader proc macro requires it.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
use crate::{
|
||||
common::{BitMatrix, Result},
|
||||
point, Exceptions, Point, ResultPoint,
|
||||
point, Exceptions, Point,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -74,7 +74,7 @@ impl<'a> MonochromeRectangleDetector<'_> {
|
||||
bottom,
|
||||
halfWidth / 2,
|
||||
)?;
|
||||
top = (pointA.getY() - 1f32) as i32;
|
||||
top = (pointA.y - 1f32) as i32;
|
||||
let pointB = self.findCornerFromCenter(
|
||||
halfWidth,
|
||||
-deltaX,
|
||||
@@ -86,7 +86,7 @@ impl<'a> MonochromeRectangleDetector<'_> {
|
||||
bottom,
|
||||
halfHeight / 2,
|
||||
)?;
|
||||
left = (pointB.getX() - 1f32) as i32;
|
||||
left = (pointB.x - 1f32) as i32;
|
||||
let pointC = self.findCornerFromCenter(
|
||||
halfWidth,
|
||||
deltaX,
|
||||
@@ -98,7 +98,7 @@ impl<'a> MonochromeRectangleDetector<'_> {
|
||||
bottom,
|
||||
halfHeight / 2,
|
||||
)?;
|
||||
right = (pointC.getX() + 1f32) as i32;
|
||||
right = (pointC.x + 1f32) as i32;
|
||||
let pointD = self.findCornerFromCenter(
|
||||
halfWidth,
|
||||
0,
|
||||
@@ -110,7 +110,7 @@ impl<'a> MonochromeRectangleDetector<'_> {
|
||||
bottom,
|
||||
halfWidth / 2,
|
||||
)?;
|
||||
bottom = (pointD.getY() + 1f32) as i32;
|
||||
bottom = (pointD.y + 1f32) as i32;
|
||||
|
||||
// Go try to find point A again with better information -- might have been off at first.
|
||||
pointA = self.findCornerFromCenter(
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use crate::{
|
||||
common::{BitMatrix, Result},
|
||||
point, Exceptions, Point, ResultPoint,
|
||||
point, Exceptions, Point,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -326,14 +326,14 @@ impl<'a> WhiteRectangleDetector<'_> {
|
||||
// y y
|
||||
//
|
||||
|
||||
let yi = y.getX();
|
||||
let yj = y.getY();
|
||||
let zi = z.getX();
|
||||
let zj = z.getY();
|
||||
let xi = x.getX();
|
||||
let xj = x.getY();
|
||||
let ti = t.getX();
|
||||
let tj = t.getY();
|
||||
let yi = y.x;
|
||||
let yj = y.y;
|
||||
let zi = z.x;
|
||||
let zj = z.y;
|
||||
let xi = x.x;
|
||||
let xj = x.y;
|
||||
let ti = t.x;
|
||||
let tj = t.y;
|
||||
|
||||
if yi < self.width as f32 / 2.0f32 {
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user