Struct map_gui::tools::camera::CameraState [−][src]
Represents the state of a widgetry Canvas.
Fields
cam_x: f64
cam_y: f64
cam_zoom: f64
Implementations
impl CameraState
[src]
impl CameraState
[src]pub fn save(canvas: &Canvas, name: &MapName)
[src]
Save the camera’s configuration for the specified map, and also remember this map was the last to be used.
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<'de> Deserialize<'de> for CameraState
[src]
impl<'de> Deserialize<'de> for CameraState
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for CameraState
[src]
impl Serialize for CameraState
[src]Auto Trait Implementations
impl RefUnwindSafe for CameraState
impl Send for CameraState
impl Sync for CameraState
impl Unpin for CameraState
impl UnwindSafe for CameraState
Blanket Implementations
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,