Struct rxing::RXingResultPoint
source · pub struct RXingResultPoint { /* private fields */ }Expand description
Encapsulates a point of interest in an image containing a barcode. Typically, this would be the location of a finder pattern or the corner of the barcode, for example.
@author Sean Owen
Implementations§
source§impl RXingResultPoint
impl RXingResultPoint
pub fn dot(a: RXingResultPoint, b: RXingResultPoint) -> f32
pub fn cross(a: &RXingResultPoint, b: &RXingResultPoint) -> f32
sourcepub fn sumAbsComponent(p: &RXingResultPoint) -> f32
pub fn sumAbsComponent(p: &RXingResultPoint) -> f32
L1 norm
sourcepub fn length(p: RXingResultPoint) -> f32
pub fn length(p: RXingResultPoint) -> f32
L2 norm
sourcepub fn maxAbsComponent(p: &RXingResultPoint) -> f32
pub fn maxAbsComponent(p: &RXingResultPoint) -> f32
L-inf norm
pub fn distance(a: RXingResultPoint, b: RXingResultPoint) -> f32
sourcepub fn centered(p: &RXingResultPoint) -> RXingResultPoint
pub fn centered(p: &RXingResultPoint) -> RXingResultPoint
Calculate a floating point pixel coordinate representing the ‘center’ of the pixel. This is sort of the inverse operation of the PointI(PointF) conversion constructor. See also the documentation of the GridSampler API.
pub fn normalized(d: RXingResultPoint) -> RXingResultPoint
pub fn bresenhamDirection(d: &RXingResultPoint) -> RXingResultPoint
pub fn mainDirection(d: RXingResultPoint) -> RXingResultPoint
Trait Implementations§
source§impl Add<RXingResultPoint> for RXingResultPoint
impl Add<RXingResultPoint> for RXingResultPoint
§type Output = RXingResultPoint
type Output = RXingResultPoint
The resulting type after applying the
+ operator.source§impl AddAssign<RXingResultPoint> for RXingResultPoint
impl AddAssign<RXingResultPoint> for RXingResultPoint
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moresource§impl Clone for RXingResultPoint
impl Clone for RXingResultPoint
source§fn clone(&self) -> RXingResultPoint
fn clone(&self) -> RXingResultPoint
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RXingResultPoint
impl Debug for RXingResultPoint
source§impl Default for RXingResultPoint
impl Default for RXingResultPoint
source§fn default() -> RXingResultPoint
fn default() -> RXingResultPoint
Returns the “default value” for a type. Read more
source§impl Display for RXingResultPoint
impl Display for RXingResultPoint
source§impl Div<f32> for RXingResultPoint
impl Div<f32> for RXingResultPoint
source§impl From<Point> for RXingResultPoint
impl From<Point> for RXingResultPoint
source§impl Hash for RXingResultPoint
impl Hash for RXingResultPoint
source§impl Mul<&RXingResultPoint> for f32
impl Mul<&RXingResultPoint> for f32
§type Output = RXingResultPoint
type Output = RXingResultPoint
The resulting type after applying the
* operator.source§impl Mul<&mut RXingResultPoint> for f32
impl Mul<&mut RXingResultPoint> for f32
§type Output = RXingResultPoint
type Output = RXingResultPoint
The resulting type after applying the
* operator.source§impl Mul<RXingResultPoint> for RXingResultPoint
impl Mul<RXingResultPoint> for RXingResultPoint
§type Output = RXingResultPoint
type Output = RXingResultPoint
The resulting type after applying the
* operator.source§impl Mul<RXingResultPoint> for f32
impl Mul<RXingResultPoint> for f32
§type Output = RXingResultPoint
type Output = RXingResultPoint
The resulting type after applying the
* operator.source§impl Mul<RXingResultPoint> for i32
impl Mul<RXingResultPoint> for i32
§type Output = RXingResultPoint
type Output = RXingResultPoint
The resulting type after applying the
* operator.source§impl Mul<f32> for RXingResultPoint
impl Mul<f32> for RXingResultPoint
source§impl Mul<i32> for RXingResultPoint
impl Mul<i32> for RXingResultPoint
source§impl Neg for RXingResultPoint
impl Neg for RXingResultPoint
source§impl PartialEq<RXingResultPoint> for RXingResultPoint
impl PartialEq<RXingResultPoint> for RXingResultPoint
source§impl ResultPoint for RXingResultPoint
impl ResultPoint for RXingResultPoint
source§impl Sub<&RXingResultPoint> for RXingResultPoint
impl Sub<&RXingResultPoint> for RXingResultPoint
source§impl Sub<RXingResultPoint> for RXingResultPoint
impl Sub<RXingResultPoint> for RXingResultPoint
source§impl<'a> Sum<&'a RXingResultPoint> for RXingResultPoint
impl<'a> Sum<&'a RXingResultPoint> for RXingResultPoint
source§fn sum<I: Iterator<Item = &'a RXingResultPoint>>(iter: I) -> Self
fn sum<I: Iterator<Item = &'a RXingResultPoint>>(iter: I) -> Self
Method which takes an iterator and generates
Self from the elements by
“summing up” the items.impl Copy for RXingResultPoint
impl Eq for RXingResultPoint
Auto Trait Implementations§
impl RefUnwindSafe for RXingResultPoint
impl Send for RXingResultPoint
impl Sync for RXingResultPoint
impl Unpin for RXingResultPoint
impl UnwindSafe for RXingResultPoint
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
§impl<Src, Dst> ValueInto<Dst> for Srcwhere
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Srcwhere
Dst: ValueFrom<Src>,
§fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.