mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 15:33:44 +03:00
35 lines
42 KiB
HTML
35 lines
42 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Canvas` struct in crate `ezgui`."><meta name="keywords" content="rust, rustlang, rust-lang, Canvas"><title>ezgui::Canvas - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../ezgui/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Canvas</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.cam_x">cam_x</a><a href="#structfield.cam_y">cam_y</a><a href="#structfield.cam_zoom">cam_zoom</a><a href="#structfield.covered_areas">covered_areas</a><a href="#structfield.cursor">cursor</a><a href="#structfield.drag_canvas_from">drag_canvas_from</a><a href="#structfield.drag_just_ended">drag_just_ended</a><a href="#structfield.edge_auto_panning">edge_auto_panning</a><a href="#structfield.gui_scroll_speed">gui_scroll_speed</a><a href="#structfield.invert_scroll">invert_scroll</a><a href="#structfield.keys_to_pan">keys_to_pan</a><a href="#structfield.lctrl_held">lctrl_held</a><a href="#structfield.lshift_held">lshift_held</a><a href="#structfield.map_dims">map_dims</a><a href="#structfield.touchpad_to_move">touchpad_to_move</a><a href="#structfield.window_has_cursor">window_has_cursor</a><a href="#structfield.window_height">window_height</a><a href="#structfield.window_width">window_width</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.align_window">align_window</a><a href="#method.center_on_map_pt">center_on_map_pt</a><a href="#method.center_to_map_pt">center_to_map_pt</a><a href="#method.center_to_screen_pt">center_to_screen_pt</a><a href="#method.get_cursor">get_cursor</a><a href="#method.get_cursor_in_map_space">get_cursor_in_map_space</a><a href="#method.get_cursor_in_screen_space">get_cursor_in_screen_space</a><a href="#method.get_inner_bounds">get_inner_bounds</a><a href="#method.get_map_bounds">get_map_bounds</a><a href="#method.get_screen_bounds">get_screen_bounds</a><a href="#method.get_window_dims">get_window_dims</a><a href="#method.handle_event">handle_event</a><a href="#method.load_camera_state">load_camera_state</a><a href="#method.map_to_screen">map_to_screen</a><a href="#method.mark_covered_area">mark_covered_area</a><a href="#method.min_zoom">min_zoom</a><a href="#method.new">new</a><a href="#method.save_camera_state">save_camera_state</a><a href="#method.screen_to_map">screen_to_map</a><a href="#method.start_drawing">start_drawing</a><a href="#method.zoom">zoom</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='index.html'>ezgui</a></p><script>window.sidebarCurrent = {name: 'Canvas', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/ezgui/canvas.rs.html#15-47' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>ezgui</a>::<wbr><a class="struct" href=''>Canvas</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Canvas {
|
||
pub cam_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||
pub cam_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||
pub cam_zoom: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||
pub(crate) cursor: <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a>,
|
||
pub(crate) window_has_cursor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
pub(crate) drag_canvas_from: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a>, <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>>,
|
||
pub(crate) drag_just_ended: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
pub window_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||
pub window_height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
|
||
pub map_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>,
|
||
pub invert_scroll: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
pub touchpad_to_move: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
pub edge_auto_panning: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
pub keys_to_pan: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
pub gui_scroll_speed: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
|
||
pub(crate) covered_areas: <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../ezgui/struct.ScreenRectangle.html" title="struct ezgui::ScreenRectangle">ScreenRectangle</a>>>,
|
||
pub(crate) lctrl_held: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
pub(crate) lshift_held: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
|
||
}</pre></div><h2 id='fields' class='fields small-section-header'>
|
||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.cam_x" class="structfield small-section-header"><a href="#structfield.cam_x" class="anchor field"></a><code id="cam_x.v">cam_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.cam_y" class="structfield small-section-header"><a href="#structfield.cam_y" class="anchor field"></a><code id="cam_y.v">cam_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.cam_zoom" class="structfield small-section-header"><a href="#structfield.cam_zoom" class="anchor field"></a><code id="cam_zoom.v">cam_zoom: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.cursor" class="structfield small-section-header"><a href="#structfield.cursor" class="anchor field"></a><code id="cursor.v">cursor: <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a></code></span><span id="structfield.window_has_cursor" class="structfield small-section-header"><a href="#structfield.window_has_cursor" class="anchor field"></a><code id="window_has_cursor.v">window_has_cursor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.drag_canvas_from" class="structfield small-section-header"><a href="#structfield.drag_canvas_from" class="anchor field"></a><code id="drag_canvas_from.v">drag_canvas_from: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a>, <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code></span><span id="structfield.drag_just_ended" class="structfield small-section-header"><a href="#structfield.drag_just_ended" class="anchor field"></a><code id="drag_just_ended.v">drag_just_ended: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.window_width" class="structfield small-section-header"><a href="#structfield.window_width" class="anchor field"></a><code id="window_width.v">window_width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.window_height" class="structfield small-section-header"><a href="#structfield.window_height" class="anchor field"></a><code id="window_height.v">window_height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.map_dims" class="structfield small-section-header"><a href="#structfield.map_dims" class="anchor field"></a><code id="map_dims.v">map_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span><span id="structfield.invert_scroll" class="structfield small-section-header"><a href="#structfield.invert_scroll" class="anchor field"></a><code id="invert_scroll.v">invert_scroll: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.touchpad_to_move" class="structfield small-section-header"><a href="#structfield.touchpad_to_move" class="anchor field"></a><code id="touchpad_to_move.v">touchpad_to_move: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.edge_auto_panning" class="structfield small-section-header"><a href="#structfield.edge_auto_panning" class="anchor field"></a><code id="edge_auto_panning.v">edge_auto_panning: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.keys_to_pan" class="structfield small-section-header"><a href="#structfield.keys_to_pan" class="anchor field"></a><code id="keys_to_pan.v">keys_to_pan: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.gui_scroll_speed" class="structfield small-section-header"><a href="#structfield.gui_scroll_speed" class="anchor field"></a><code id="gui_scroll_speed.v">gui_scroll_speed: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="structfield.covered_areas" class="structfield small-section-header"><a href="#structfield.covered_areas" class="anchor field"></a><code id="covered_areas.v">covered_areas: <a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../ezgui/struct.ScreenRectangle.html" title="struct ezgui::ScreenRectangle">ScreenRectangle</a>>></code></span><span id="structfield.lctrl_held" class="structfield small-section-header"><a href="#structfield.lctrl_held" class="anchor field"></a><code id="lctrl_held.v">lctrl_held: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.lshift_held" class="structfield small-section-header"><a href="#structfield.lshift_held" class="anchor field"></a><code id="lshift_held.v">lshift_held: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../ezgui/struct.Canvas.html" title="struct ezgui::Canvas">Canvas</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/ezgui/canvas.rs.html#49-339' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub(crate) fn <a href='#method.new' class='fnname'>new</a>(initial_dims: <a class="struct" href="../ezgui/struct.ScreenDims.html" title="struct ezgui::ScreenDims">ScreenDims</a>) -> <a class="struct" href="../ezgui/struct.Canvas.html" title="struct ezgui::Canvas">Canvas</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#50-77' title='goto source code'>[src]</a></h4><h4 id='method.min_zoom' class="method"><code id='min_zoom.v'>pub fn <a href='#method.min_zoom' class='fnname'>min_zoom</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#79-83' title='goto source code'>[src]</a></h4><h4 id='method.handle_event' class="method"><code id='handle_event.v'>pub(crate) fn <a href='#method.handle_event' class='fnname'>handle_event</a>(<br> &mut self, <br> input: &mut <a class="struct" href="../ezgui/struct.UserInput.html" title="struct ezgui::UserInput">UserInput</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../ezgui/enum.UpdateType.html" title="enum ezgui::UpdateType">UpdateType</a>></code><a class='srclink' href='../src/ezgui/canvas.rs.html#85-176' title='goto source code'>[src]</a></h4><h4 id='method.zoom' class="method"><code id='zoom.v'>fn <a href='#method.zoom' class='fnname'>zoom</a>(&mut self, delta: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, focus: <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a>)</code><a class='srclink' href='../src/ezgui/canvas.rs.html#178-190' title='goto source code'>[src]</a></h4><h4 id='method.start_drawing' class="method"><code id='start_drawing.v'>pub(crate) fn <a href='#method.start_drawing' class='fnname'>start_drawing</a>(&self)</code><a class='srclink' href='../src/ezgui/canvas.rs.html#192-194' title='goto source code'>[src]</a></h4><h4 id='method.mark_covered_area' class="method"><code id='mark_covered_area.v'>pub fn <a href='#method.mark_covered_area' class='fnname'>mark_covered_area</a>(&self, rect: <a class="struct" href="../ezgui/struct.ScreenRectangle.html" title="struct ezgui::ScreenRectangle">ScreenRectangle</a>)</code><a class='srclink' href='../src/ezgui/canvas.rs.html#197-199' title='goto source code'>[src]</a></h4><h4 id='method.get_cursor' class="method"><code id='get_cursor.v'>pub fn <a href='#method.get_cursor' class='fnname'>get_cursor</a>(&self) -> <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#202-204' title='goto source code'>[src]</a></h4><h4 id='method.get_cursor_in_screen_space' class="method"><code id='get_cursor_in_screen_space.v'>pub fn <a href='#method.get_cursor_in_screen_space' class='fnname'>get_cursor_in_screen_space</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a>></code><a class='srclink' href='../src/ezgui/canvas.rs.html#206-212' title='goto source code'>[src]</a></h4><h4 id='method.get_cursor_in_map_space' class="method"><code id='get_cursor_in_map_space.v'>pub fn <a href='#method.get_cursor_in_map_space' class='fnname'>get_cursor_in_map_space</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>></code><a class='srclink' href='../src/ezgui/canvas.rs.html#214-228' title='goto source code'>[src]</a></h4><h4 id='method.screen_to_map' class="method"><code id='screen_to_map.v'>pub fn <a href='#method.screen_to_map' class='fnname'>screen_to_map</a>(&self, pt: <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a>) -> <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#230-235' title='goto source code'>[src]</a></h4><h4 id='method.center_to_screen_pt' class="method"><code id='center_to_screen_pt.v'>pub fn <a href='#method.center_to_screen_pt' class='fnname'>center_to_screen_pt</a>(&self) -> <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#237-239' title='goto source code'>[src]</a></h4><h4 id='method.center_to_map_pt' class="method"><code id='center_to_map_pt.v'>pub fn <a href='#method.center_to_map_pt' class='fnname'>center_to_map_pt</a>(&self) -> <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#241-243' title='goto source code'>[src]</a></h4><h4 id='method.center_on_map_pt' class="method"><code id='center_on_map_pt.v'>pub fn <a href='#method.center_on_map_pt' class='fnname'>center_on_map_pt</a>(&mut self, pt: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>)</code><a class='srclink' href='../src/ezgui/canvas.rs.html#245-248' title='goto source code'>[src]</a></h4><h4 id='method.map_to_screen' class="method"><code id='map_to_screen.v'>pub fn <a href='#method.map_to_screen' class='fnname'>map_to_screen</a>(&self, pt: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -> <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#250-255' title='goto source code'>[src]</a></h4><h4 id='method.get_inner_bounds' class="method"><code id='get_inner_bounds.v'>fn <a href='#method.get_inner_bounds' class='fnname'>get_inner_bounds</a>(&self) -> <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#258-269' title='goto source code'>[src]</a></h4><h4 id='method.get_window_dims' class="method"><code id='get_window_dims.v'>pub fn <a href='#method.get_window_dims' class='fnname'>get_window_dims</a>(&self) -> <a class="struct" href="../ezgui/struct.ScreenDims.html" title="struct ezgui::ScreenDims">ScreenDims</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#271-273' title='goto source code'>[src]</a></h4><h4 id='method.get_map_bounds' class="method"><code id='get_map_bounds.v'>fn <a href='#method.get_map_bounds' class='fnname'>get_map_bounds</a>(&self) -> <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#275-280' title='goto source code'>[src]</a></h4><h4 id='method.get_screen_bounds' class="method"><code id='get_screen_bounds.v'>pub fn <a href='#method.get_screen_bounds' class='fnname'>get_screen_bounds</a>(&self) -> <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#282-287' title='goto source code'>[src]</a></h4><h4 id='method.save_camera_state' class="method"><code id='save_camera_state.v'>pub fn <a href='#method.save_camera_state' class='fnname'>save_camera_state</a>(&self, map_name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code><a class='srclink' href='../src/ezgui/canvas.rs.html#289-296' title='goto source code'>[src]</a></h4><h4 id='method.load_camera_state' class="method"><code id='load_camera_state.v'>pub fn <a href='#method.load_camera_state' class='fnname'>load_camera_state</a>(&mut self, map_name: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#299-312' title='goto source code'>[src]</a></h4><h4 id='method.align_window' class="method"><code id='align_window.v'>pub(crate) fn <a href='#method.align_window' class='fnname'>align_window</a>(<br> &self, <br> dims: <a class="struct" href="../ezgui/struct.ScreenDims.html" title="struct ezgui::ScreenDims">ScreenDims</a>, <br> horiz: <a class="enum" href="../ezgui/enum.HorizontalAlignment.html" title="enum ezgui::HorizontalAlignment">HorizontalAlignment</a>, <br> vert: <a class="enum" href="../ezgui/enum.VerticalAlignment.html" title="enum ezgui::VerticalAlignment">VerticalAlignment</a><br>) -> <a class="struct" href="../ezgui/struct.ScreenPt.html" title="struct ezgui::ScreenPt">ScreenPt</a></code><a class='srclink' href='../src/ezgui/canvas.rs.html#314-338' title='goto source code'>[src]</a></h4></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../ezgui/struct.Canvas.html" title="struct ezgui::Canvas">Canvas</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../ezgui/struct.Canvas.html" title="struct ezgui::Canvas">Canvas</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../ezgui/struct.Canvas.html" title="struct ezgui::Canvas">Canvas</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../ezgui/struct.Canvas.html" title="struct ezgui::Canvas">Canvas</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../ezgui/struct.Canvas.html" title="struct ezgui::Canvas">Canvas</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></div><h3 id='impl-Downcast' class='impl'><code class='in-band'>impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code id='into_any.v'>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
|
||
</div><h4 id='method.into_any_rc' class="method hidden"><code id='into_any_rc.v'>fn <a href='#method.into_any_rc' class='fnname'>into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
|
||
</div><h4 id='method.as_any' class="method hidden"><code id='as_any.v'>fn <a href='#method.as_any' class='fnname'>as_any</a>(&self) -> &(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot generate <code>&Any</code>'s vtable from <code>&Trait</code>'s. <a href="#tymethod.as_any">Read more</a></p>
|
||
</div><h4 id='method.as_any_mut' class="method hidden"><code id='as_any_mut.v'>fn <a href='#method.as_any_mut' class='fnname'>as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot generate <code>&mut Any</code>'s vtable from <code>&mut Trait</code>'s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||
</div></div><h3 id='impl-DowncastSync' class='impl'><code class='in-band'>impl<T> DowncastSync for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href='#impl-DowncastSync' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any_arc' class="method hidden"><code id='into_any_arc.v'>fn <a href='#method.into_any_arc' class='fnname'>into_any_arc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>></code></h4><div class='docblock hidden'><p>Convert <code>Arc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Arc<Any></code>. <code>Arc<Any></code> can then be further <code>downcast</code> into <code>Arc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_arc">Read more</a></p>
|
||
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#565-569' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#566-568' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#554-561' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#558-560' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#602-611' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#608-610' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588-597' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#594-596' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-VZip%3CV%3E' class='impl'><code class='in-band'>impl<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href='#impl-VZip%3CV%3E' class='anchor'></a></h3><div class='impl-items'><h4 id='method.vzip' class="method hidden"><code id='vzip.v'>fn <a href='#method.vzip' class='fnname'>vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "ezgui";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |