[][src]Struct map_gui::tools::CameraState

pub struct CameraState {
    cam_x: f64,
    cam_y: f64,
    cam_zoom: f64,
}

Represents the state of a widgetry Canvas.

Fields

cam_x: f64cam_y: f64cam_zoom: f64

Implementations

impl CameraState[src]

pub fn save(canvas: &Canvas, name: &MapName)[src]

Save the camera's configuration for the specified map.

pub fn load(ctx: &mut EventCtx<'_>, name: &MapName) -> bool[src]

Load the camera's configuration for the specified map. Returns true if successful, has no effect if the file is missing or broken.

Trait Implementations

impl Debug for CameraState[src]

impl<'de> Deserialize<'de> for CameraState[src]

impl Serialize for CameraState[src]

Auto Trait Implementations

impl RefUnwindSafe for CameraState[src]

impl Send for CameraState[src]

impl Sync for CameraState[src]

impl Unpin for CameraState[src]

impl UnwindSafe for CameraState[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,