pub struct CameraDelta {
pub offset: Option<ScreenPoint>,
pub scale: Option<f64>,
pub bearing: Option<f64>,
pub pitch: Option<f64>,
pub anchor: Option<ScreenPoint>,
pub momentum: Option<GestureMomentum>,
pub animation: AnimationOptions,
pub gesture_phase: GesturePhase,
}Expand description
A change to the camera from where it is now, for gestures.
See mln_camera_delta in the
C API reference.
Fields§
§offset: Option<ScreenPoint>Moves the map’s content this far on the screen, as a drag does.
scale: Option<f64>Multiplies the map’s scale. 2 zooms in by one level.
bearing: Option<f64>Degrees to add to the bearing.
pitch: Option<f64>Degrees to add to the pitch.
anchor: Option<ScreenPoint>The screen point that scale, bearing, and pitch keep in place. It
needs one of them, and it combines with offset only in a delta without
a duration.
momentum: Option<GestureMomentum>How the gesture keeps moving after this delta. Only a delta in the
GesturePhase::End phase carries it.
animation: AnimationOptions§gesture_phase: GesturePhaseTrait Implementations§
Source§impl Clone for CameraDelta
impl Clone for CameraDelta
Source§fn clone(&self) -> CameraDelta
fn clone(&self) -> CameraDelta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CameraDelta
impl Debug for CameraDelta
Source§impl Default for CameraDelta
impl Default for CameraDelta
Source§fn default() -> CameraDelta
fn default() -> CameraDelta
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for CameraDelta
impl !UnwindSafe for CameraDelta
impl Freeze for CameraDelta
impl Send for CameraDelta
impl Sync for CameraDelta
impl Unpin for CameraDelta
impl UnsafeUnpin for CameraDelta
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more