pub struct AlignmentPattern { /* private fields */ }Expand description
Encapsulates an alignment pattern, which are the smaller square patterns found in all but the simplest QR Codes.
@author Sean Owen
Implementations§
Source§impl AlignmentPattern
impl AlignmentPattern
pub fn new(posX: f32, posY: f32, estimatedModuleSize: f32) -> Self
Sourcepub fn aboutEquals(&self, moduleSize: f32, i: f32, j: f32) -> bool
pub fn aboutEquals(&self, moduleSize: f32, i: f32, j: f32) -> bool
Determines if this alignment pattern "about equals" an alignment pattern at the stated position and size -- meaning, it is at nearly the same center with nearly the same size.
Sourcepub fn combineEstimate(
&self,
i: f32,
j: f32,
newModuleSize: f32,
) -> AlignmentPattern
pub fn combineEstimate( &self, i: f32, j: f32, newModuleSize: f32, ) -> AlignmentPattern
Combines this object’s current estimate of a finder pattern position and module size with a new estimate. It returns a new {@code FinderPattern} containing an average of the two.
Trait Implementations§
Source§impl Clone for AlignmentPattern
impl Clone for AlignmentPattern
Source§fn clone(&self) -> AlignmentPattern
fn clone(&self) -> AlignmentPattern
Returns a duplicate 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 AlignmentPattern
impl Debug for AlignmentPattern
Source§impl From<&AlignmentPattern> for Point
impl From<&AlignmentPattern> for Point
Source§fn from(value: &AlignmentPattern) -> Self
fn from(value: &AlignmentPattern) -> Self
Converts to this type from the input type.
Source§impl From<AlignmentPattern> for Point
impl From<AlignmentPattern> for Point
Source§fn from(value: AlignmentPattern) -> Self
fn from(value: AlignmentPattern) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AlignmentPattern
impl PartialEq for AlignmentPattern
impl Copy for AlignmentPattern
impl StructuralPartialEq for AlignmentPattern
Auto Trait Implementations§
impl Freeze for AlignmentPattern
impl RefUnwindSafe for AlignmentPattern
impl Send for AlignmentPattern
impl Sync for AlignmentPattern
impl Unpin for AlignmentPattern
impl UnsafeUnpin for AlignmentPattern
impl UnwindSafe for AlignmentPattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.