pub struct HotspotBuilder<R> { /* private fields */ }Expand description
A builder for creating hotspots.
Implementations§
Source§impl<R: InternalRepr> HotspotBuilder<R>
impl<R: InternalRepr> HotspotBuilder<R>
Sourcepub const fn with_repr<NewR: InternalRepr>(self) -> HotspotBuilder<NewR>
pub const fn with_repr<NewR: InternalRepr>(self) -> HotspotBuilder<NewR>
Set the internal representation for the hotspot.
Source§impl HotspotBuilder<PixelRepr>
impl HotspotBuilder<PixelRepr>
Sourcepub const fn from_pixels(
self,
(_, _): (Coordinate, Coordinate),
) -> Hotspot<PixelRepr>
pub const fn from_pixels( self, (_, _): (Coordinate, Coordinate), ) -> Hotspot<PixelRepr>
Create a pixel-based hotspot from top-left and bottom-right coordinates.
NOTE: we assume that these are provided with the origin in the bottom left, e.g.
X is expected to be up/down (i.e. vertical), Y is expected to be left/right (i.e. Horizontal).
Source§impl HotspotBuilder<PercentageRepr>
impl HotspotBuilder<PercentageRepr>
Sourcepub const fn from_percentage(
self,
input: (Coordinate, Coordinate),
_: ImageDimensions,
) -> Hotspot<PercentageRepr>
pub const fn from_percentage( self, input: (Coordinate, Coordinate), _: ImageDimensions, ) -> Hotspot<PercentageRepr>
Create a percentage-based hotspot from top-left and bottom-right coordinates and image dimensions.
Trait Implementations§
Source§impl<R: Clone> Clone for HotspotBuilder<R>
impl<R: Clone> Clone for HotspotBuilder<R>
Source§fn clone(&self) -> HotspotBuilder<R>
fn clone(&self) -> HotspotBuilder<R>
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 HotspotBuilder<PercentageRepr>
impl Debug for HotspotBuilder<PercentageRepr>
Source§impl Debug for HotspotBuilder<PixelRepr>
impl Debug for HotspotBuilder<PixelRepr>
Source§impl<R: Hash> Hash for HotspotBuilder<R>
impl<R: Hash> Hash for HotspotBuilder<R>
Source§impl<R: Ord> Ord for HotspotBuilder<R>
impl<R: Ord> Ord for HotspotBuilder<R>
Source§fn cmp(&self, other: &HotspotBuilder<R>) -> Ordering
fn cmp(&self, other: &HotspotBuilder<R>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<R: PartialEq> PartialEq for HotspotBuilder<R>
impl<R: PartialEq> PartialEq for HotspotBuilder<R>
Source§impl<R: PartialOrd> PartialOrd for HotspotBuilder<R>
impl<R: PartialOrd> PartialOrd for HotspotBuilder<R>
impl<R: Copy> Copy for HotspotBuilder<R>
impl<R: Eq> Eq for HotspotBuilder<R>
impl<R> StructuralPartialEq for HotspotBuilder<R>
Auto Trait Implementations§
impl<R> Freeze for HotspotBuilder<R>
impl<R> RefUnwindSafe for HotspotBuilder<R>where
R: RefUnwindSafe,
impl<R> Send for HotspotBuilder<R>where
R: Send,
impl<R> Sync for HotspotBuilder<R>where
R: Sync,
impl<R> Unpin for HotspotBuilder<R>where
R: Unpin,
impl<R> UnwindSafe for HotspotBuilder<R>where
R: UnwindSafe,
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