This commit is contained in:
dabreegster 2020-12-15 22:02:20 +00:00
parent 49dbea9f04
commit 9274640823
26 changed files with 372 additions and 115 deletions

View File

@ -3,4 +3,4 @@
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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">&#9776;</div><a href='../experiment/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate experiment</p><div class='block version'><p>Version 0.1.0</p></div><a id='all-types' href='index.html'><p>Back to index</p></a></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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span>
</span>
<span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='after_level/struct.Results.html'>after_level::Results</a></li><li><a href='after_level/struct.Strategize.html'>after_level::Strategize</a></li><li><a href='animation/struct.Animation.html'>animation::Animation</a></li><li><a href='animation/struct.Animator.html'>animation::Animator</a></li><li><a href='animation/struct.SnowEffect.html'>animation::SnowEffect</a></li><li><a href='animation/struct.Snowflake.html'>animation::Snowflake</a></li><li><a href='before_level/struct.Picker.html'>before_level::Picker</a></li><li><a href='buildings/struct.Buildings.html'>buildings::Buildings</a></li><li><a href='controls/struct.InstantController.html'>controls::InstantController</a></li><li><a href='game/struct.EnergylessArrow.html'>game::EnergylessArrow</a></li><li><a href='game/struct.Game.html'>game::Game</a></li><li><a href='game/struct.GameState.html'>game::GameState</a></li><li><a href='game/struct.MinimapController.html'>game::MinimapController</a></li><li><a href='levels/struct.Level.html'>levels::Level</a></li><li><a href='music/struct.Inner.html'>music::Inner</a></li><li><a href='music/struct.Music.html'>music::Music</a></li><li><a href='player/struct.BuildingsAlongRoad.html'>player::BuildingsAlongRoad</a></li><li><a href='player/struct.Player.html'>player::Player</a></li><li><a href='session/struct.ColorScheme.html'>session::ColorScheme</a></li><li><a href='session/struct.Session.html'>session::Session</a></li><li><a href='title/struct.TitleScreen.html'>title::TitleScreen</a></li><li><a href='vehicles/struct.Vehicle.html'>vehicles::Vehicle</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='animation/enum.Effect.html'>animation::Effect</a></li><li><a href='buildings/enum.BldgState.html'>buildings::BldgState</a></li><li><a href='player/enum.On.html'>player::On</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='before_level/fn.make_upzone_panel.html'>before_level::make_upzone_panel</a></li><li><a href='before_level/fn.make_vehicle_panel.html'>before_level::make_vehicle_panel</a></li><li><a href='controls/fn.angle_from_arrow_keys.html'>controls::angle_from_arrow_keys</a></li><li><a href='fn.main.html'>main</a></li><li><a href='meters/fn.custom_bar.html'>meters::custom_bar</a></li><li><a href='meters/fn.make_bar.html'>meters::make_bar</a></li><li><a href='title/fn.locked_level.html'>title::locked_level</a></li><li><a href='title/fn.unlocked_level.html'>title::unlocked_level</a></li></ul><h3 id='Typedefs'>Typedefs</h3><ul class='typedefs docblock'><li><a href='type.App.html'>App</a></li><li><a href='type.Transition.html'>Transition</a></li></ul><h3 id='Constants'>Constants</h3><ul class='constants docblock'><li><a href='after_level/constant.ZOOM.html'>after_level::ZOOM</a></li><li><a href='before_level/constant.ZOOM.html'>before_level::ZOOM</a></li><li><a href='controls/constant.HACK.html'>controls::HACK</a></li><li><a href='game/constant.ACQUIRE_BOOST_RATE.html'>game::ACQUIRE_BOOST_RATE</a></li><li><a href='game/constant.BOOST_SPEED_MULTIPLIER.html'>game::BOOST_SPEED_MULTIPLIER</a></li><li><a href='player/constant.ZOOM.html'>player::ZOOM</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
<span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='after_level/struct.Results.html'>after_level::Results</a></li><li><a href='after_level/struct.Strategize.html'>after_level::Strategize</a></li><li><a href='animation/struct.Animation.html'>animation::Animation</a></li><li><a href='animation/struct.Animator.html'>animation::Animator</a></li><li><a href='animation/struct.SnowEffect.html'>animation::SnowEffect</a></li><li><a href='animation/struct.Snowflake.html'>animation::Snowflake</a></li><li><a href='before_level/struct.Picker.html'>before_level::Picker</a></li><li><a href='buildings/struct.Buildings.html'>buildings::Buildings</a></li><li><a href='controls/struct.InstantController.html'>controls::InstantController</a></li><li><a href='game/struct.EnergylessArrow.html'>game::EnergylessArrow</a></li><li><a href='game/struct.Game.html'>game::Game</a></li><li><a href='game/struct.GameState.html'>game::GameState</a></li><li><a href='game/struct.MinimapController.html'>game::MinimapController</a></li><li><a href='levels/struct.Level.html'>levels::Level</a></li><li><a href='music/struct.Inner.html'>music::Inner</a></li><li><a href='music/struct.Music.html'>music::Music</a></li><li><a href='player/struct.BuildingsAlongRoad.html'>player::BuildingsAlongRoad</a></li><li><a href='player/struct.Player.html'>player::Player</a></li><li><a href='session/struct.ColorScheme.html'>session::ColorScheme</a></li><li><a href='session/struct.Session.html'>session::Session</a></li><li><a href='title/struct.Credits.html'>title::Credits</a></li><li><a href='title/struct.TitleScreen.html'>title::TitleScreen</a></li><li><a href='vehicles/struct.Vehicle.html'>vehicles::Vehicle</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='animation/enum.Effect.html'>animation::Effect</a></li><li><a href='buildings/enum.BldgState.html'>buildings::BldgState</a></li><li><a href='player/enum.On.html'>player::On</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='before_level/fn.make_upzone_panel.html'>before_level::make_upzone_panel</a></li><li><a href='before_level/fn.make_vehicle_panel.html'>before_level::make_vehicle_panel</a></li><li><a href='controls/fn.angle_from_arrow_keys.html'>controls::angle_from_arrow_keys</a></li><li><a href='fn.main.html'>main</a></li><li><a href='meters/fn.custom_bar.html'>meters::custom_bar</a></li><li><a href='meters/fn.make_bar.html'>meters::make_bar</a></li><li><a href='title/fn.level_btn.html'>title::level_btn</a></li><li><a href='title/fn.link.html'>title::link</a></li><li><a href='title/fn.locked_level.html'>title::locked_level</a></li><li><a href='title/fn.unlocked_level.html'>title::unlocked_level</a></li></ul><h3 id='Typedefs'>Typedefs</h3><ul class='typedefs docblock'><li><a href='type.App.html'>App</a></li><li><a href='type.Transition.html'>Transition</a></li></ul><h3 id='Constants'>Constants</h3><ul class='constants docblock'><li><a href='after_level/constant.ZOOM.html'>after_level::ZOOM</a></li><li><a href='before_level/constant.ZOOM.html'>before_level::ZOOM</a></li><li><a href='controls/constant.HACK.html'>controls::HACK</a></li><li><a href='game/constant.ACQUIRE_BOOST_RATE.html'>game::ACQUIRE_BOOST_RATE</a></li><li><a href='game/constant.BOOST_SPEED_MULTIPLIER.html'>game::BOOST_SPEED_MULTIPLIER</a></li><li><a href='player/constant.ZOOM.html'>player::ZOOM</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@ -0,0 +1,4 @@
<!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 `level_btn` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, level_btn"><title>experiment::title::level_btn - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a></p><script>window.sidebarCurrent = {name: 'level_btn', ty: 'fn', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#105-125' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="fn" href=''>level_btn</a></span></h1><pre class='rust fn'>fn level_btn(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; GeomBatch</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -0,0 +1,4 @@
<!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 `link` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, link"><title>experiment::title::link - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a></p><script>window.sidebarCurrent = {name: 'link', ty: 'fn', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#187-189' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="fn" href=''>link</a></span></h1><pre class='rust fn'>fn link(ctx: &amp;mut EventCtx&lt;'_&gt;, label: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, url: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!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 `locked_level` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, locked_level"><title>experiment::title::locked_level - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a></p><script>window.sidebarCurrent = {name: 'locked_level', ty: 'fn', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#105-116' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="fn" href=''>locked_level</a></span></h1><pre class='rust fn'>fn locked_level(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#128-135' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="fn" href=''>locked_level</a></span></h1><pre class='rust fn'>fn locked_level(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!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 `unlocked_level` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, unlocked_level"><title>experiment::title::unlocked_level - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a></p><script>window.sidebarCurrent = {name: 'unlocked_level', ty: 'fn', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#118-124' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="fn" href=''>unlocked_level</a></span></h1><pre class='rust fn'>fn unlocked_level(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#137-144' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="fn" href=''>unlocked_level</a></span></h1><pre class='rust fn'>fn unlocked_level(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;level: &amp;<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!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 `title` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, title"><title>experiment::title - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module title</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'title', ty: 'mod', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#1-124' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>title</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.TitleScreen.html" title='experiment::title::TitleScreen struct'>TitleScreen</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.locked_level.html" title='experiment::title::locked_level fn'>locked_level</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.unlocked_level.html" title='experiment::title::unlocked_level fn'>unlocked_level</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#1-219' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>title</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.Credits.html" title='experiment::title::Credits struct'>Credits</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.TitleScreen.html" title='experiment::title::TitleScreen struct'>TitleScreen</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.level_btn.html" title='experiment::title::level_btn fn'>level_btn</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.link.html" title='experiment::title::link fn'>link</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.locked_level.html" title='experiment::title::locked_level fn'>locked_level</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.unlocked_level.html" title='experiment::title::unlocked_level fn'>unlocked_level</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["locked_level",""],["unlocked_level",""]],"struct":[["TitleScreen",""]]});
initSidebarItems({"fn":[["level_btn",""],["link",""],["locked_level",""],["unlocked_level",""]],"struct":[["Credits",""],["TitleScreen",""]]});

View File

@ -0,0 +1,37 @@
<!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 `Credits` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, Credits"><title>experiment::title::Credits - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Credits</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CSimpleApp%3CSession%3E%3E">State&lt;SimpleApp&lt;Session&gt;&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a></p><script>window.sidebarCurrent = {name: 'Credits', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#146-148' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="struct" href=''>Credits</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct Credits {
panel: Panel,
}</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</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="../../experiment/title/struct.Credits.html" title="struct experiment::title::Credits">Credits</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#150-185' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>fn <a href='#method.new' class='fnname'>new</a>(ctx: &amp;mut EventCtx&lt;'_&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt;&gt;</code><a class='srclink' href='../../src/experiment/title.rs.html#151-184' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt; for <a class="struct" href="../../experiment/title/struct.Credits.html" title="struct experiment::title::Credits">Credits</a></code><a href='#impl-State%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#191-219' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;<br>) -&gt; Transition&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt;</code><a class='srclink' href='../../src/experiment/title.rs.html#192-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;)</code><a class='srclink' href='../../src/experiment/title.rs.html#215-218' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></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="../../experiment/title/struct.Credits.html" title="struct experiment::title::Credits">Credits</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="../../experiment/title/struct.Credits.html" title="struct experiment::title::Credits">Credits</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="../../experiment/title/struct.Credits.html" title="struct experiment::title::Credits">Credits</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="../../experiment/title/struct.Credits.html" title="struct experiment::title::Credits">Credits</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="../../experiment/title/struct.Credits.html" title="struct experiment::title::Credits">Credits</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' 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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' 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&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>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>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can
then be further <code>downcast</code> into <code>Box&lt;ConcreteType&gt;</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>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>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Rc&lt;Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Rc&lt;Any&gt;</code>. <code>Rc&lt;Any&gt;</code> can then be
further <code>downcast</code> into <code>Rc&lt;ConcreteType&gt;</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>fn <a href='#method.as_any' class='fnname'>as_any</a>(&amp;self) -&gt; &amp;(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>&amp;Trait</code> (where <code>Trait: Downcast</code>) to <code>&amp;Any</code>. This is needed since Rust cannot
generate <code>&amp;Any</code>'s vtable from <code>&amp;Trait</code>'s. <a href="#tymethod.as_any">Read more</a></p>
</div><h4 id='method.as_any_mut' class="method hidden"><code>fn <a href='#method.as_any_mut' class='fnname'>as_any_mut</a>(&amp;mut self) -&gt; &amp;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>&amp;mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&amp;Any</code>. This is needed since Rust cannot
generate <code>&amp;mut Any</code>'s vtable from <code>&amp;mut Trait</code>'s. <a href="#tymethod.as_any_mut">Read more</a></p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; 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#551-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Instrument' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</code><a href='#impl-Instrument' class='anchor'></a><a class='srclink' href='https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#155' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.instrument' class="method hidden"><code>fn <a href='https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.instrument' class='fnname'>instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class='srclink' href='https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#38-40' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
</div><h4 id='method.in_current_span' class="method hidden"><code>fn <a href='https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.in_current_span' class='fnname'>in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class='srclink' href='https://docs.rs/tracing/0.1.22/src/tracing/instrument.rs.html#74-76' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="../struct.Span.html#method.current">current</a> <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.22/tracing/instrument/trait.Instrument.html#method.in_current_span">Read more</a></p>
</div></div><h3 id='impl-Instrument-1' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html" title="trait tracing_futures::Instrument">Instrument</a> for T</code><a href='#impl-Instrument-1' class='anchor'></a><a class='srclink' href='https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#248' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.instrument-1' class="method hidden"><code>fn <a href='https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument' class='fnname'>instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -&gt; <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class='srclink' href='https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#129-131' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the provided <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.instrument">Read more</a></p>
</div><h4 id='method.in_current_span-1' class="method hidden"><code>fn <a href='https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span' class='fnname'>in_current_span</a>(self) -&gt; <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a>&lt;Self&gt;</code><a class='srclink' href='https://docs.rs/tracing-futures/0.2.3/src/tracing_futures/lib.rs.html#166-168' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Instruments this type with the <a href="https://docs.rs/tracing/latest/tracing/span/struct.Span.html#method.current">current</a> <code>Span</code>, returning an
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/trait.Instrument.html#method.in_current_span">Read more</a></p>
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</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#540-547' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#544-546' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-Same%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; Same&lt;T&gt; for T</code><a href='#impl-Same%3CT%3E' class='anchor'></a></h3><div class='impl-items'><h4 id='associatedtype.Output' class="type"><code>type <a href='#associatedtype.Output' class="type">Output</a> = T</code></h4><div class='docblock'><p>Should always be <code>Self</code></p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</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#588-597' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code>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>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<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>&gt;</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-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</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#574-583' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<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>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<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>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#580-582' 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&lt;V, T&gt; VZip&lt;V&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;V: MultiLane&lt;T&gt;,&nbsp;</span></code><a href='#impl-VZip%3CV%3E' class='anchor'></a></h3><div class='impl-items'><h4 id='method.vzip' class="method hidden"><code>fn <a href='#method.vzip' class='fnname'>vzip</a>(self) -&gt; V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,11 +1,11 @@
<!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 `TitleScreen` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, TitleScreen"><title>experiment::title::TitleScreen - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><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">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct TitleScreen</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.panel">panel</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-State%3CSimpleApp%3CSession%3E%3E">State&lt;SimpleApp&lt;Session&gt;&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a></p><script>window.sidebarCurrent = {name: 'TitleScreen', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#10-12' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="struct" href=''>TitleScreen</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct TitleScreen {
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/title.rs.html#11-13' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>title</a>::<wbr><a class="struct" href=''>TitleScreen</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct TitleScreen {
panel: Panel,
}</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</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="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#14-63' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt;&gt;</code><a class='srclink' href='../../src/experiment/title.rs.html#15-62' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt; for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-State%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#65-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;<br>) -&gt; Transition&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt;</code><a class='srclink' href='../../src/experiment/title.rs.html#66-96' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;)</code><a class='srclink' href='../../src/experiment/title.rs.html#98-101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</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="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#15-66' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt;&gt;</code><a class='srclink' href='../../src/experiment/title.rs.html#16-65' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3CSession%3E%3E' class='impl'><code class='in-band'>impl State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt; for <a class="struct" href="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</a></code><a href='#impl-State%3CSimpleApp%3CSession%3E%3E' class='anchor'></a><a class='srclink' href='../../src/experiment/title.rs.html#68-103' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;<br>) -&gt; Transition&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;&gt;</code><a class='srclink' href='../../src/experiment/title.rs.html#69-97' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>&gt;)</code><a class='srclink' href='../../src/experiment/title.rs.html#99-102' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></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="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</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="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</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="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</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="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</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="../../experiment/title/struct.TitleScreen.html" title="struct experiment::title::TitleScreen">TitleScreen</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <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>

View File

@ -1,5 +1,5 @@
<!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 `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[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">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html#53' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Tue, 15 Dec 2020 21:10:54 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-c1f324f9d3d7e3b2/out/built.rs.html#53' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Tue, 15 Dec 2020 21:59:48 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
(function() {var implementors = {};
implementors["experiment"] = [{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Strategize","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Results","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Picker","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Game","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for TitleScreen","synthetic":false,"types":[]}];
implementors["experiment"] = [{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Strategize","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Results","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Picker","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Game","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for TitleScreen","synthetic":false,"types":[]},{"text":"impl State&lt;SimpleApp&lt;Session&gt;&gt; for Credits","synthetic":false,"types":[]}];
implementors["fifteen_min"] = [{"text":"impl State&lt;SimpleApp&lt;()&gt;&gt; for Viewer","synthetic":false,"types":[]}];
implementors["game"] = [{"text":"impl State&lt;App&gt; for CutscenePlayer","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for FYI","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ChallengesPicker","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for Warping","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for DebugWarp","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for SimpleStateWrapper","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for Viewer","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for Floodfiller","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for PathCounter","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for PolygonDebugger","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for DebugMode","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ScreenshotTest","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for CollisionsViewer","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for PopularDestinations","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ViewKML","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for PolygonEditor","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ScenarioManager","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for StoryMapEditor","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for DevToolsMode","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for BulkSelect","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for BulkEdit","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ClusterTrafficSignalEditor","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for RouteEditor","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for SignalPicker","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for PreviewTrafficSignal","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for TrafficSignalEditor","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ZoneEditor","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for EditMode","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for SaveEdits","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for LoadEdits","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ConfirmDiscard","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for PickLayer","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for TitleScreen","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for MainMenu","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for About","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for Proposals","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for CommuterPatterns","synthetic":false,"types":[]},{"text":"impl&lt;T:&nbsp;'static, F:&nbsp;'static, P:&nbsp;'static + Fn(&amp;mut EventCtx&lt;'_&gt;, &amp;App, &amp;Table&lt;T, F&gt;) -&gt; Panel&gt; State&lt;App&gt; for GenericTripTable&lt;T, F, P&gt;","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ActiveTraffic","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for TransitRoutes","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for TripSummaries","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for TrafficSignalDemand","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for CensusGenerator","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for AgentSpawner","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for EditScenarioModifiers","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for ChangeMode","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for FinalScore","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for TrafficRecorder","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for JumpToTime","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for JumpToDelay","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for TimeWarpScreen","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for SandboxMode","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for BackToMainMenu","synthetic":false,"types":[]},{"text":"impl State&lt;App&gt; for SandboxLoader","synthetic":false,"types":[]}];
implementors["map_editor"] = [{"text":"impl State&lt;App&gt; for MainState","synthetic":false,"types":[]}];

File diff suppressed because one or more lines are too long

View File

@ -125,11 +125,107 @@
<span id="122">122</span>
<span id="123">123</span>
<span id="124">124</span>
<span id="125">125</span>
<span id="126">126</span>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
<span id="216">216</span>
<span id="217">217</span>
<span id="218">218</span>
<span id="219">219</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">geom</span>::<span class="ident">Percent</span>;
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::<span class="ident">open_browser</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">Btn</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Widget</span>,
<span class="ident">Btn</span>, <span class="ident">Color</span>, <span class="ident">EdgeInsets</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">RewriteColor</span>,
<span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Widget</span>,
};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">levels</span>::<span class="ident">Level</span>;
@ -144,9 +240,9 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">level_buttons</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="ident">level</span>) <span class="kw">in</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">levels</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="kw">if</span> <span class="ident">idx</span> <span class="op">&lt;</span> <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">levels_unlocked</span> {
<span class="ident">level_buttons</span>.<span class="ident">push</span>(<span class="ident">unlocked_level</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">level</span>, <span class="ident">idx</span>));
<span class="ident">level_buttons</span>.<span class="ident">push</span>(<span class="ident">unlocked_level</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">level</span>, <span class="ident">idx</span>).<span class="ident">margin_below</span>(<span class="number">16</span>));
} <span class="kw">else</span> {
<span class="ident">level_buttons</span>.<span class="ident">push</span>(<span class="ident">locked_level</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">level</span>, <span class="ident">idx</span>));
<span class="ident">level_buttons</span>.<span class="ident">push</span>(<span class="ident">locked_level</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">level</span>, <span class="ident">idx</span>).<span class="ident">margin_below</span>(<span class="number">16</span>));
}
}
@ -155,13 +251,12 @@
<span class="ident">Btn</span>::<span class="ident">svg_def</span>(<span class="string">&quot;system/assets/tools/quit.svg&quot;</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">&quot;quit&quot;</span>, <span class="ident">Key</span>::<span class="ident">Escape</span>)
.<span class="ident">align_right</span>(),
<span class="ident">Line</span>(<span class="string">&quot;A/B STREET&quot;</span>)
.<span class="ident">big_heading_plain</span>()
.<span class="ident">draw</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),
<span class="ident">Line</span>(<span class="string">&quot;15 Minute Santa&quot;</span>)
.<span class="ident">display_title</span>()
.<span class="ident">draw</span>(<span class="ident">ctx</span>)
.<span class="ident">container</span>()
.<span class="ident">padding</span>(<span class="number">16</span>)
.<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">fade_map_dark</span>)
.<span class="ident">centered_horiz</span>(),
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(
<span class="string">&quot;Time for Santa to deliver presents in Seattle! But... 2020 has thoroughly \
@ -171,18 +266,21 @@
))
.<span class="ident">wrap_to_pct</span>(<span class="ident">ctx</span>, <span class="number">50</span>)
.<span class="ident">draw</span>(<span class="ident">ctx</span>)
.<span class="ident">container</span>()
.<span class="ident">padding</span>(<span class="number">16</span>)
.<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">fade_map_dark</span>)
.<span class="ident">centered_horiz</span>(),
<span class="ident">Widget</span>::<span class="ident">custom_row</span>(<span class="ident">level_buttons</span>).<span class="ident">flex_wrap</span>(<span class="ident">ctx</span>, <span class="ident">Percent</span>::<span class="ident">int</span>(<span class="number">80</span>)),
<span class="string">&quot;Created by Dustin Carlino, Yuwen Li, &amp; Michael Kirk&quot;</span>
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>)
.<span class="ident">centered_horiz</span>(),
<span class="ident">Btn</span>::<span class="ident">plaintext</span>(<span class="string">&quot;Santa made by @parallaxcreativedesign&quot;</span>)
.<span class="ident">build</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;open https://www.instagram.com/parallaxcreativedesign/&quot;</span>,
<span class="prelude-val">None</span>,
)
.<span class="ident">centered_horiz</span>(),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Btn</span>::<span class="ident">text_bg1</span>(<span class="string">&quot;Credits&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>),
<span class="string">&quot;Created by Dustin Carlino, Yuwen Li, &amp; Michael Kirk&quot;</span>
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>)
.<span class="ident">container</span>()
.<span class="ident">padding</span>(<span class="number">16</span>)
.<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">fade_map_dark</span>),
])
.<span class="ident">centered_horiz</span>()
.<span class="ident">align_bottom</span>(),
]))
.<span class="ident">exact_size_percent</span>(<span class="number">90</span>, <span class="number">85</span>)
.<span class="ident">build_custom</span>(<span class="ident">ctx</span>),
@ -197,12 +295,10 @@
<span class="string">&quot;quit&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Pop</span>;
}
<span class="string">&quot;Credits&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">Credits</span>::<span class="ident">new</span>(<span class="ident">ctx</span>));
}
<span class="ident">x</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">url</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;open &quot;</span>) {
<span class="ident">open_browser</span>(<span class="ident">url</span>.<span class="ident">to_string</span>());
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="kw">for</span> <span class="ident">level</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">levels</span> {
<span class="kw">if</span> <span class="ident">x</span> <span class="op">=</span><span class="op">=</span> <span class="ident">level</span>.<span class="ident">title</span> {
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="kw">crate</span>::<span class="ident">before_level</span>::<span class="ident">Picker</span>::<span class="ident">new</span>(
@ -229,13 +325,31 @@
}
}
<span class="comment">// TODO Preview the map, add padding, add the linear gradient...</span>
<span class="kw">fn</span> <span class="ident">locked_level</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">level</span>: <span class="kw-2">&amp;</span><span class="ident">Level</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>().<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_bike</span>);
<span class="kw">fn</span> <span class="ident">level_btn</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">level</span>: <span class="kw-2">&amp;</span><span class="ident">Level</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>();
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;LEVEL {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>)).<span class="ident">small_heading</span>());
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="kw-2">&amp;</span><span class="ident">level</span>.<span class="ident">title</span>).<span class="ident">small_heading</span>());
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="kw-2">&amp;</span><span class="ident">level</span>.<span class="ident">description</span>));
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">txt</span>.<span class="ident">wrap_to_pct</span>(<span class="ident">ctx</span>, <span class="number">15</span>).<span class="ident">render_autocropped</span>(<span class="ident">ctx</span>);
<span class="kw">let</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">txt</span>.<span class="ident">wrap_to_pct</span>(<span class="ident">ctx</span>, <span class="number">15</span>).<span class="ident">render_autocropped</span>(<span class="ident">ctx</span>);
<span class="comment">// Add padding</span>
<span class="kw">let</span> (<span class="kw-2">mut</span> <span class="ident">batch</span>, <span class="ident">hitbox</span>) <span class="op">=</span> <span class="ident">batch</span>
.<span class="ident">batch</span>()
.<span class="ident">container</span>()
.<span class="ident">padding</span>(<span class="ident">EdgeInsets</span> {
<span class="ident">top</span>: <span class="number">20.0</span>,
<span class="ident">bottom</span>: <span class="number">20.0</span>,
<span class="ident">left</span>: <span class="number">10.0</span>,
<span class="ident">right</span>: <span class="number">10.0</span>,
})
.<span class="ident">to_geom</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>);
<span class="ident">batch</span>.<span class="ident">unshift</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_bike</span>, <span class="ident">hitbox</span>);
<span class="ident">batch</span>
}
<span class="comment">// TODO Preview the map, add padding, add the linear gradient...</span>
<span class="kw">fn</span> <span class="ident">locked_level</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">level</span>: <span class="kw-2">&amp;</span><span class="ident">Level</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">level_btn</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">level</span>, <span class="ident">idx</span>);
<span class="kw">let</span> <span class="ident">hitbox</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">get_bounds</span>().<span class="ident">get_rectangle</span>();
<span class="kw">let</span> <span class="ident">center</span> <span class="op">=</span> <span class="ident">hitbox</span>.<span class="ident">center</span>();
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">fade_map_dark</span>, <span class="ident">hitbox</span>);
@ -244,11 +358,87 @@
}
<span class="kw">fn</span> <span class="ident">unlocked_level</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">level</span>: <span class="kw-2">&amp;</span><span class="ident">Level</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">txt</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">new</span>().<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">unzoomed_bike</span>);
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;LEVEL {}&quot;</span>, <span class="ident">idx</span> <span class="op">+</span> <span class="number">1</span>)).<span class="ident">small_heading</span>());
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="kw-2">&amp;</span><span class="ident">level</span>.<span class="ident">title</span>).<span class="ident">small_heading</span>());
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="kw-2">&amp;</span><span class="ident">level</span>.<span class="ident">description</span>));
<span class="ident">Btn</span>::<span class="ident">plaintext_custom</span>(<span class="kw-2">&amp;</span><span class="ident">level</span>.<span class="ident">title</span>, <span class="ident">txt</span>.<span class="ident">wrap_to_pct</span>(<span class="ident">ctx</span>, <span class="number">15</span>)).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>)
<span class="ident">level_btn</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">level</span>, <span class="ident">idx</span>)
.<span class="ident">to_btn_custom</span>(<span class="ident">RewriteColor</span>::<span class="ident">Change</span>(
<span class="ident">Color</span>::<span class="ident">WHITE</span>,
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">hovering_color</span>,
))
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="ident">level</span>.<span class="ident">title</span>, <span class="prelude-val">None</span>)
}
<span class="kw">struct</span> <span class="ident">Credits</span> {
<span class="ident">panel</span>: <span class="ident">Panel</span>,
}
<span class="kw">impl</span> <span class="ident">Credits</span> {
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Credits</span> {
<span class="ident">panel</span>: <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;15 Minute Santa&quot;</span>).<span class="ident">big_heading_plain</span>().<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">Btn</span>::<span class="ident">close</span>(<span class="ident">ctx</span>),
]),
<span class="ident">link</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;Created by the A/B Street team&quot;</span>,
<span class="string">&quot;https://abstreet.org&quot;</span>
),
<span class="ident">Text</span>::<span class="ident">from_multiline</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Lead: Dustin Carlino&quot;</span>),
<span class="ident">Line</span>(<span class="string">&quot;Programming &amp; game design: Michael Kirk&quot;</span>),
<span class="ident">Line</span>(<span class="string">&quot;UI/UX: Yuwen Li&quot;</span>),
]).<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">link</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;Santa made by @parallaxcreativedesign&quot;</span>,
<span class="string">&quot;https://www.instagram.com/parallaxcreativedesign/&quot;</span>,
),
<span class="ident">link</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;Map data thanks to OpenStreetMap contributors&quot;</span>,
<span class="string">&quot;https://www.openstreetmap.org/about&quot;</span>),
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">&quot;Land use data from Seattle GeoData&quot;</span>, <span class="string">&quot;https://data-seattlecitygis.opendata.arcgis.com/datasets/current-land-use-zoning-detail&quot;</span>),
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">&quot;Music by Royalty Free Music&quot;</span>, <span class="string">&quot;https://soundcloud.com/royaltyfreebackgroundmusic/creative-commons-music-4061&quot;</span>),
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">&quot;Fonts and icons by various sources&quot;</span>, <span class="string">&quot;https://dabreegster.github.io/abstreet/howto/#data-source-licensing&quot;</span>),
<span class="ident">Btn</span>::<span class="ident">text_bg2</span>(<span class="string">&quot;Back&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="ident">Key</span>::<span class="ident">Enter</span>).<span class="ident">centered_horiz</span>(),
]))
.<span class="ident">build</span>(<span class="ident">ctx</span>),
})
}
}
<span class="kw">fn</span> <span class="ident">link</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">label</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">url</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="ident">Btn</span>::<span class="ident">plaintext</span>(<span class="ident">label</span>).<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;open {}&quot;</span>, <span class="ident">url</span>), <span class="prelude-val">None</span>)
}
<span class="kw">impl</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">Credits</span> {
<span class="kw">fn</span> <span class="ident">event</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Transition</span> {
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">event</span>(<span class="ident">ctx</span>) {
<span class="ident">Outcome</span>::<span class="ident">Clicked</span>(<span class="ident">x</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
<span class="string">&quot;close&quot;</span> <span class="op">|</span> <span class="string">&quot;Back&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Pop</span>;
}
<span class="ident">x</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">url</span>) <span class="op">=</span> <span class="ident">x</span>.<span class="ident">strip_prefix</span>(<span class="string">&quot;open &quot;</span>) {
<span class="ident">open_browser</span>(<span class="ident">url</span>.<span class="ident">to_string</span>());
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>;
}
<span class="macro">unreachable</span><span class="macro">!</span>()
}
},
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> {}
}
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">update_music</span>(<span class="ident">ctx</span>);
<span class="ident">Transition</span>::<span class="ident">Keep</span>
}
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">music</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
}
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.48.0 (7eac88abb 2020-11-16)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Tue, 15 Dec 2020 21:10:54 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Tue, 15 Dec 2020 21:59:48 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -260,6 +260,14 @@
<span id="257">257</span>
<span id="258">258</span>
<span id="259">259</span>
<span id="260">260</span>
<span id="261">261</span>
<span id="262">262</span>
<span id="263">263</span>
<span id="264">264</span>
<span id="265">265</span>
<span id="266">266</span>
<span id="267">267</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">Bounds</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>};
@ -286,7 +294,7 @@
}
}
<span class="comment">// Adds a single polygon, painted according to `Fill`</span>
<span class="doccomment">/// Adds a single polygon, painted according to `Fill`</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">push</span><span class="op">&lt;</span><span class="ident">F</span>: <span class="ident">Into</span><span class="op">&lt;</span><span class="ident">Fill</span><span class="op">&gt;</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">fill</span>: <span class="ident">F</span>, <span class="ident">p</span>: <span class="ident">Polygon</span>) {
<span class="self">self</span>.<span class="ident">push_with_z</span>(<span class="ident">fill</span>, <span class="ident">p</span>, <span class="number">0.0</span>);
}
@ -300,6 +308,11 @@
<span class="self">self</span>.<span class="ident">list</span>.<span class="ident">push</span>((<span class="ident">fill</span>.<span class="ident">into</span>(), <span class="ident">p</span>, <span class="ident">z_offset</span>));
}
<span class="doccomment">/// Adds a single polygon to the front of the batch, painted according to `Fill`</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">unshift</span><span class="op">&lt;</span><span class="ident">F</span>: <span class="ident">Into</span><span class="op">&lt;</span><span class="ident">Fill</span><span class="op">&gt;</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">fill</span>: <span class="ident">F</span>, <span class="ident">p</span>: <span class="ident">Polygon</span>) {
<span class="self">self</span>.<span class="ident">list</span>.<span class="ident">insert</span>(<span class="number">0</span>, (<span class="ident">fill</span>.<span class="ident">into</span>(), <span class="ident">p</span>, <span class="number">0.0</span>));
}
<span class="doccomment">/// Applies one Fill to many polygons.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">extend</span><span class="op">&lt;</span><span class="ident">F</span>: <span class="ident">Into</span><span class="op">&lt;</span><span class="ident">Fill</span><span class="op">&gt;</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">fill</span>: <span class="ident">F</span>, <span class="ident">polys</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Polygon</span><span class="op">&gt;</span>) {
<span class="kw">let</span> <span class="ident">fill</span> <span class="op">=</span> <span class="ident">fill</span>.<span class="ident">into</span>();
@ -335,11 +348,14 @@
<span class="ident">DeferDraw</span>::<span class="ident">new</span>(<span class="self">self</span>)
}
<span class="doccomment">/// Turn this batch into a button.</span>
<span class="doccomment">/// Turn this batch into a button, with the hovered version rewriting all colors.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">to_btn</span>(<span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">BtnBuilder</span> {
<span class="kw">let</span> <span class="ident">hovered</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">clone</span>()
.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAll</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">hovering_color</span>));
<span class="self">self</span>.<span class="ident">to_btn_custom</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAll</span>(<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">hovering_color</span>))
}
<span class="doccomment">/// Turn this batch into a button.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">to_btn_custom</span>(<span class="self">self</span>, <span class="ident">rewrite</span>: <span class="ident">RewriteColor</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">BtnBuilder</span> {
<span class="kw">let</span> <span class="ident">hovered</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">clone</span>().<span class="ident">color</span>(<span class="ident">rewrite</span>);
<span class="kw">let</span> <span class="ident">hitbox</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">get_bounds</span>().<span class="ident">get_rectangle</span>();
<span class="ident">Btn</span>::<span class="ident">custom</span>(<span class="self">self</span>, <span class="ident">hovered</span>, <span class="ident">hitbox</span>, <span class="prelude-val">None</span>)
}

View File

@ -1,7 +1,7 @@
<!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 `RewriteColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, RewriteColor"><title>widgetry::RewriteColor - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Enum RewriteColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.apply">apply</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'RewriteColor', ty: 'enum', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../src/widgetry/geom.rs.html#226-238' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>widgetry</a>::<wbr><a class="enum" href=''>RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum RewriteColor {
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../src/widgetry/geom.rs.html#234-246' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>widgetry</a>::<wbr><a class="enum" href=''>RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum RewriteColor {
NoOp,
Change(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>,&nbsp;<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
ChangeAll(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
@ -16,7 +16,7 @@
be a solid block of color.</p>
</div><div id="variant.ChangeAlpha" class="variant small-section-header"><a href="#variant.ChangeAlpha" class="anchor field"></a><code>ChangeAlpha(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</code></div><div class='docblock'><p>Change the alpha value of all colors to this value.</p>
</div><div id="variant.MakeGrayscale" class="variant small-section-header"><a href="#variant.MakeGrayscale" class="anchor field"></a><code>MakeGrayscale</code></div><div class='docblock'><p>Convert all colors to greyscale.</p>
</div><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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/widgetry/geom.rs.html#240-259' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.apply' class="method"><code>fn <a href='#method.apply' class='fnname'>apply</a>(&amp;self, c: <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -&gt; <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#241-258' 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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <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><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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/widgetry/geom.rs.html#248-267' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.apply' class="method"><code>fn <a href='#method.apply' class='fnname'>apply</a>(&amp;self, c: <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -&gt; <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#249-266' 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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' 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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' 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&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>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>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,7 +1,7 @@
<!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 `RewriteColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, RewriteColor"><title>widgetry::geom::RewriteColor - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum RewriteColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.apply">apply</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>geom</a></p><script>window.sidebarCurrent = {name: 'RewriteColor', ty: 'enum', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/widgetry/geom.rs.html#226-238' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>geom</a>::<wbr><a class="enum" href=''>RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum RewriteColor {
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/widgetry/geom.rs.html#234-246' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>geom</a>::<wbr><a class="enum" href=''>RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum RewriteColor {
NoOp,
Change(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>,&nbsp;<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
ChangeAll(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
@ -16,7 +16,7 @@
be a solid block of color.</p>
</div><div id="variant.ChangeAlpha" class="variant small-section-header"><a href="#variant.ChangeAlpha" class="anchor field"></a><code>ChangeAlpha(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</code></div><div class='docblock'><p>Change the alpha value of all colors to this value.</p>
</div><div id="variant.MakeGrayscale" class="variant small-section-header"><a href="#variant.MakeGrayscale" class="anchor field"></a><code>MakeGrayscale</code></div><div class='docblock'><p>Convert all colors to greyscale.</p>
</div><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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/widgetry/geom.rs.html#240-259' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.apply' class="method"><code>fn <a href='#method.apply' class='fnname'>apply</a>(&amp;self, c: <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -&gt; <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#241-258' 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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <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><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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/widgetry/geom.rs.html#248-267' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.apply' class="method"><code>fn <a href='#method.apply' class='fnname'>apply</a>(&amp;self, c: <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -&gt; <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#249-266' 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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' 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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' 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&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>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>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,7 +1,7 @@
<!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 `geom` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, geom"><title>widgetry::geom - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module geom</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'geom', ty: 'mod', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/widgetry/geom.rs.html#1-259' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>geom</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/widgetry/geom.rs.html#1-267' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>geom</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.GeomBatch.html" title='widgetry::geom::GeomBatch struct'>GeomBatch</a></td><td class='docblock-short'><p>A mutable builder for a group of colored polygons.</p>
</td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.RewriteColor.html" title='widgetry::geom::RewriteColor enum'>RewriteColor</a></td><td class='docblock-short'><p>A way to transform all colors in a GeomBatch.</p>

View File

@ -1,41 +1,44 @@
<!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 `GeomBatch` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, GeomBatch"><title>widgetry::geom::GeomBatch - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.from_svg_contents">from_svg_contents</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_btn">to_btn</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E">From&lt;Vec&lt;(F, Polygon)&gt;&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>geom</a></p><script>window.sidebarCurrent = {name: 'GeomBatch', 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><span class="help-button">?</span>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><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">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.from_svg_contents">from_svg_contents</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_btn">to_btn</a><a href="#method.to_btn_custom">to_btn_custom</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.unshift">unshift</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E">From&lt;Vec&lt;(F, Polygon)&gt;&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>geom</a></p><script>window.sidebarCurrent = {name: 'GeomBatch', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/widgetry/geom.rs.html#10-15' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>geom</a>::<wbr><a class="struct" href=''>GeomBatch</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct GeomBatch {
pub(crate) list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;,
pub autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
}</pre></div><div class='docblock'><p>A mutable builder for a group of colored polygons.</p>
</div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;</code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <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="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/widgetry/geom.rs.html#17-213' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#19-24' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates an empty batch.</p>
</div><h4 id='method.push' class="method"><code>pub fn <a href='#method.push' class='fnname'>push</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#27-29' title='goto source code'>[src]</a></h4><h4 id='method.push_with_z' class="method"><code>pub fn <a href='#method.push_with_z' class='fnname'>push_with_z</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#34-38' title='goto source code'>[src]</a></h4><div class='docblock'><p>Offset z value to render above/below other polygons.
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;</code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <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="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/widgetry/geom.rs.html#17-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#19-24' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates an empty batch.</p>
</div><h4 id='method.push' class="method"><code>pub fn <a href='#method.push' class='fnname'>push</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#27-29' title='goto source code'>[src]</a></h4><div class='docblock'><p>Adds a single polygon, painted according to <code>Fill</code></p>
</div><h4 id='method.push_with_z' class="method"><code>pub fn <a href='#method.push_with_z' class='fnname'>push_with_z</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#34-38' title='goto source code'>[src]</a></h4><div class='docblock'><p>Offset z value to render above/below other polygons.
z must be in (-1, 0] to ensure we don't traverse layers of the UI - to make
sure we don't inadvertently render something <em>above</em> a tooltip, etc.</p>
</div><h4 id='method.extend' class="method"><code>pub fn <a href='#method.extend' class='fnname'>extend</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, polys: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#41-46' title='goto source code'>[src]</a></h4><div class='docblock'><p>Applies one Fill to many polygons.</p>
</div><h4 id='method.append' class="method"><code>pub fn <a href='#method.append' class='fnname'>append</a>(&amp;mut self, other: <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a>)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#49-51' title='goto source code'>[src]</a></h4><div class='docblock'><p>Appends all colored polygons from another batch to the current one.</p>
</div><h4 id='method.consume' class="method"><code>pub fn <a href='#method.consume' class='fnname'>consume</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;</code><a class='srclink' href='../../src/widgetry/geom.rs.html#54-56' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the colored polygons in this batch, destroying the batch.</p>
</div><h4 id='method.draw' class="method"><code>pub fn <a href='#method.draw' class='fnname'>draw</a>(self, g: &amp;mut <a class="struct" href="../../widgetry/struct.GfxCtx.html" title="struct widgetry::GfxCtx">GfxCtx</a>&lt;'_&gt;)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#59-62' title='goto source code'>[src]</a></h4><div class='docblock'><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
</div><h4 id='method.upload' class="method"><code>pub fn <a href='#method.upload' class='fnname'>upload</a>(self, ctx: &amp;<a class="struct" href="../../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="struct" href="../../widgetry/struct.Drawable.html" title="struct widgetry::Drawable">Drawable</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#66-68' title='goto source code'>[src]</a></h4><div class='docblock'><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
</div><h4 id='method.unshift' class="method"><code>pub fn <a href='#method.unshift' class='fnname'>unshift</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#41-43' title='goto source code'>[src]</a></h4><div class='docblock'><p>Adds a single polygon to the front of the batch, painted according to <code>Fill</code></p>
</div><h4 id='method.extend' class="method"><code>pub fn <a href='#method.extend' class='fnname'>extend</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, polys: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#46-51' title='goto source code'>[src]</a></h4><div class='docblock'><p>Applies one Fill to many polygons.</p>
</div><h4 id='method.append' class="method"><code>pub fn <a href='#method.append' class='fnname'>append</a>(&amp;mut self, other: <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a>)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#54-56' title='goto source code'>[src]</a></h4><div class='docblock'><p>Appends all colored polygons from another batch to the current one.</p>
</div><h4 id='method.consume' class="method"><code>pub fn <a href='#method.consume' class='fnname'>consume</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;</code><a class='srclink' href='../../src/widgetry/geom.rs.html#59-61' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the colored polygons in this batch, destroying the batch.</p>
</div><h4 id='method.draw' class="method"><code>pub fn <a href='#method.draw' class='fnname'>draw</a>(self, g: &amp;mut <a class="struct" href="../../widgetry/struct.GfxCtx.html" title="struct widgetry::GfxCtx">GfxCtx</a>&lt;'_&gt;)</code><a class='srclink' href='../../src/widgetry/geom.rs.html#64-67' title='goto source code'>[src]</a></h4><div class='docblock'><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
</div><h4 id='method.upload' class="method"><code>pub fn <a href='#method.upload' class='fnname'>upload</a>(self, ctx: &amp;<a class="struct" href="../../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="struct" href="../../widgetry/struct.Drawable.html" title="struct widgetry::Drawable">Drawable</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#71-73' title='goto source code'>[src]</a></h4><div class='docblock'><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
many times later.</p>
</div><h4 id='method.batch' class="method"><code>pub fn <a href='#method.batch' class='fnname'>batch</a>(self) -&gt; <a class="struct" href="../../widgetry/struct.Widget.html" title="struct widgetry::Widget">Widget</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#71-73' title='goto source code'>[src]</a></h4><div class='docblock'><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
</div><h4 id='method.to_btn' class="method"><code>pub fn <a href='#method.to_btn' class='fnname'>to_btn</a>(self, ctx: &amp;<a class="struct" href="../../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="../../widgetry/widgets/button/enum.BtnBuilder.html" title="enum widgetry::widgets::button::BtnBuilder">BtnBuilder</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#76-82' title='goto source code'>[src]</a></h4><div class='docblock'><p>Turn this batch into a button.</p>
</div><h4 id='method.get_bounds' class="method"><code>pub fn <a href='#method.get_bounds' class='fnname'>get_bounds</a>(&amp;self) -&gt; <a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#85-94' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compute the bounds of all polygons in this batch.</p>
</div><h4 id='method.autocrop' class="method"><code>pub fn <a href='#method.autocrop' class='fnname'>autocrop</a>(self) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#97-106' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
</div><h4 id='method.unioned_polygon' class="method"><code>pub fn <a href='#method.unioned_polygon' class='fnname'>unioned_polygon</a>(&amp;self) -&gt; <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#109-115' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
</div><h4 id='method.is_empty' class="method"><code>pub(crate) fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#118-120' title='goto source code'>[src]</a></h4><div class='docblock'><p>True when the batch is empty.</p>
</div><h4 id='method.get_dims' class="method"><code>pub fn <a href='#method.get_dims' class='fnname'>get_dims</a>(&amp;self) -&gt; <a class="struct" href="../../widgetry/struct.ScreenDims.html" title="struct widgetry::ScreenDims">ScreenDims</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#123-131' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the width and height of all geometry contained in the batch.</p>
</div><h4 id='method.from_svg_contents' class="method"><code>pub fn <a href='#method.from_svg_contents' class='fnname'>from_svg_contents</a>(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#134-139' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing a parsed SVG string.</p>
</div><h4 id='method.load_svg' class="method"><code>pub fn <a href='#method.load_svg' class='fnname'>load_svg</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>&gt;&gt;(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P, filename: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#142-144' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing an SVG from a file.</p>
</div><h4 id='method.color' class="method"><code>pub fn <a href='#method.color' class='fnname'>color</a>(self, transformation: <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#147-154' title='goto source code'>[src]</a></h4><div class='docblock'><p>Transforms all colors in a batch.</p>
</div><h4 id='method.centered_on' class="method"><code>pub fn <a href='#method.centered_on' class='fnname'>centered_on</a>(self, center: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#157-162' title='goto source code'>[src]</a></h4><div class='docblock'><p>Translates the batch to be centered on some point.</p>
</div><h4 id='method.translate' class="method"><code>pub fn <a href='#method.translate' class='fnname'>translate</a>(self, dx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, dy: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#165-170' title='goto source code'>[src]</a></h4><div class='docblock'><p>Translates the batch by some offset.</p>
</div><h4 id='method.rotate' class="method"><code>pub fn <a href='#method.rotate' class='fnname'>rotate</a>(self, angle: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#173-178' title='goto source code'>[src]</a></h4><div class='docblock'><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
</div><h4 id='method.rotate_around_batch_center' class="method"><code>pub fn <a href='#method.rotate_around_batch_center' class='fnname'>rotate_around_batch_center</a>(self, angle: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#181-187' title='goto source code'>[src]</a></h4><div class='docblock'><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
</div><h4 id='method.scale' class="method"><code>pub fn <a href='#method.scale' class='fnname'>scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#190-200' title='goto source code'>[src]</a></h4><div class='docblock'><p>Scales the batch by some factor.</p>
</div><h4 id='method.set_z_offset' class="method"><code>pub fn <a href='#method.set_z_offset' class='fnname'>set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#204-212' title='goto source code'>[src]</a></h4><div class='docblock'><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
</div><h4 id='method.batch' class="method"><code>pub fn <a href='#method.batch' class='fnname'>batch</a>(self) -&gt; <a class="struct" href="../../widgetry/struct.Widget.html" title="struct widgetry::Widget">Widget</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#76-78' title='goto source code'>[src]</a></h4><div class='docblock'><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
</div><h4 id='method.to_btn' class="method"><code>pub fn <a href='#method.to_btn' class='fnname'>to_btn</a>(self, ctx: &amp;<a class="struct" href="../../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="../../widgetry/widgets/button/enum.BtnBuilder.html" title="enum widgetry::widgets::button::BtnBuilder">BtnBuilder</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#81-83' title='goto source code'>[src]</a></h4><div class='docblock'><p>Turn this batch into a button, with the hovered version rewriting all colors.</p>
</div><h4 id='method.to_btn_custom' class="method"><code>pub fn <a href='#method.to_btn_custom' class='fnname'>to_btn_custom</a>(self, rewrite: <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a>) -&gt; <a class="enum" href="../../widgetry/widgets/button/enum.BtnBuilder.html" title="enum widgetry::widgets::button::BtnBuilder">BtnBuilder</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#86-90' title='goto source code'>[src]</a></h4><div class='docblock'><p>Turn this batch into a button.</p>
</div><h4 id='method.get_bounds' class="method"><code>pub fn <a href='#method.get_bounds' class='fnname'>get_bounds</a>(&amp;self) -&gt; <a class="struct" href="../../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#93-102' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compute the bounds of all polygons in this batch.</p>
</div><h4 id='method.autocrop' class="method"><code>pub fn <a href='#method.autocrop' class='fnname'>autocrop</a>(self) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#105-114' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
</div><h4 id='method.unioned_polygon' class="method"><code>pub fn <a href='#method.unioned_polygon' class='fnname'>unioned_polygon</a>(&amp;self) -&gt; <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#117-123' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
</div><h4 id='method.is_empty' class="method"><code>pub(crate) fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#126-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>True when the batch is empty.</p>
</div><h4 id='method.get_dims' class="method"><code>pub fn <a href='#method.get_dims' class='fnname'>get_dims</a>(&amp;self) -&gt; <a class="struct" href="../../widgetry/struct.ScreenDims.html" title="struct widgetry::ScreenDims">ScreenDims</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#131-139' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the width and height of all geometry contained in the batch.</p>
</div><h4 id='method.from_svg_contents' class="method"><code>pub fn <a href='#method.from_svg_contents' class='fnname'>from_svg_contents</a>(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#142-147' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing a parsed SVG string.</p>
</div><h4 id='method.load_svg' class="method"><code>pub fn <a href='#method.load_svg' class='fnname'>load_svg</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>&gt;&gt;(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P, filename: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#150-152' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing an SVG from a file.</p>
</div><h4 id='method.color' class="method"><code>pub fn <a href='#method.color' class='fnname'>color</a>(self, transformation: <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#155-162' title='goto source code'>[src]</a></h4><div class='docblock'><p>Transforms all colors in a batch.</p>
</div><h4 id='method.centered_on' class="method"><code>pub fn <a href='#method.centered_on' class='fnname'>centered_on</a>(self, center: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#165-170' title='goto source code'>[src]</a></h4><div class='docblock'><p>Translates the batch to be centered on some point.</p>
</div><h4 id='method.translate' class="method"><code>pub fn <a href='#method.translate' class='fnname'>translate</a>(self, dx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, dy: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#173-178' title='goto source code'>[src]</a></h4><div class='docblock'><p>Translates the batch by some offset.</p>
</div><h4 id='method.rotate' class="method"><code>pub fn <a href='#method.rotate' class='fnname'>rotate</a>(self, angle: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#181-186' title='goto source code'>[src]</a></h4><div class='docblock'><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
</div><h4 id='method.rotate_around_batch_center' class="method"><code>pub fn <a href='#method.rotate_around_batch_center' class='fnname'>rotate_around_batch_center</a>(self, angle: <a class="struct" href="../../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#189-195' title='goto source code'>[src]</a></h4><div class='docblock'><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
</div><h4 id='method.scale' class="method"><code>pub fn <a href='#method.scale' class='fnname'>scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#198-208' title='goto source code'>[src]</a></h4><div class='docblock'><p>Scales the batch by some factor.</p>
</div><h4 id='method.set_z_offset' class="method"><code>pub fn <a href='#method.set_z_offset' class='fnname'>set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#212-220' title='goto source code'>[src]</a></h4><div class='docblock'><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
rendering on top.</p>
</div></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/widgetry/geom.rs.html#9' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#9' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E' class='impl'><code class='in-band'>impl&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt; for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E' class='anchor'></a><a class='srclink' href='../../src/widgetry/geom.rs.html#215-223' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#217-222' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a batch of filled polygons.</p>
</div></div><h3 id='impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E' class='impl'><code class='in-band'>impl&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt; for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E' class='anchor'></a><a class='srclink' href='../../src/widgetry/geom.rs.html#223-231' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../../src/widgetry/geom.rs.html#225-230' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a batch of filled polygons.</p>
</div></div></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="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' 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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' 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>

View File

@ -1,41 +1,44 @@
<!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 `GeomBatch` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, GeomBatch"><title>widgetry::GeomBatch - 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="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.from_svg_contents">from_svg_contents</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_btn">to_btn</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E">From&lt;Vec&lt;(F, Polygon)&gt;&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'GeomBatch', 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><span class="help-button">?</span>
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><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">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.from_svg_contents">from_svg_contents</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_btn">to_btn</a><a href="#method.to_btn_custom">to_btn_custom</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.unshift">unshift</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E">From&lt;Vec&lt;(F, Polygon)&gt;&gt;</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&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'GeomBatch', 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><span class="help-button">?</span>
<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'>&#x2212;</span>]</a></span><a class='srclink' href='../src/widgetry/geom.rs.html#10-15' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>widgetry</a>::<wbr><a class="struct" href=''>GeomBatch</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct GeomBatch {
pub(crate) list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;,
pub autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
}</pre></div><div class='docblock'><p>A mutable builder for a group of colored polygons.</p>
</div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;</code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <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="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/widgetry/geom.rs.html#17-213' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#19-24' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates an empty batch.</p>
</div><h4 id='method.push' class="method"><code>pub fn <a href='#method.push' class='fnname'>push</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class='srclink' href='../src/widgetry/geom.rs.html#27-29' title='goto source code'>[src]</a></h4><h4 id='method.push_with_z' class="method"><code>pub fn <a href='#method.push_with_z' class='fnname'>push_with_z</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class='srclink' href='../src/widgetry/geom.rs.html#34-38' title='goto source code'>[src]</a></h4><div class='docblock'><p>Offset z value to render above/below other polygons.
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;</code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <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="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/widgetry/geom.rs.html#17-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#19-24' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates an empty batch.</p>
</div><h4 id='method.push' class="method"><code>pub fn <a href='#method.push' class='fnname'>push</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class='srclink' href='../src/widgetry/geom.rs.html#27-29' title='goto source code'>[src]</a></h4><div class='docblock'><p>Adds a single polygon, painted according to <code>Fill</code></p>
</div><h4 id='method.push_with_z' class="method"><code>pub fn <a href='#method.push_with_z' class='fnname'>push_with_z</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class='srclink' href='../src/widgetry/geom.rs.html#34-38' title='goto source code'>[src]</a></h4><div class='docblock'><p>Offset z value to render above/below other polygons.
z must be in (-1, 0] to ensure we don't traverse layers of the UI - to make
sure we don't inadvertently render something <em>above</em> a tooltip, etc.</p>
</div><h4 id='method.extend' class="method"><code>pub fn <a href='#method.extend' class='fnname'>extend</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, polys: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;)</code><a class='srclink' href='../src/widgetry/geom.rs.html#41-46' title='goto source code'>[src]</a></h4><div class='docblock'><p>Applies one Fill to many polygons.</p>
</div><h4 id='method.append' class="method"><code>pub fn <a href='#method.append' class='fnname'>append</a>(&amp;mut self, other: <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a>)</code><a class='srclink' href='../src/widgetry/geom.rs.html#49-51' title='goto source code'>[src]</a></h4><div class='docblock'><p>Appends all colored polygons from another batch to the current one.</p>
</div><h4 id='method.consume' class="method"><code>pub fn <a href='#method.consume' class='fnname'>consume</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;</code><a class='srclink' href='../src/widgetry/geom.rs.html#54-56' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the colored polygons in this batch, destroying the batch.</p>
</div><h4 id='method.draw' class="method"><code>pub fn <a href='#method.draw' class='fnname'>draw</a>(self, g: &amp;mut <a class="struct" href="../widgetry/struct.GfxCtx.html" title="struct widgetry::GfxCtx">GfxCtx</a>&lt;'_&gt;)</code><a class='srclink' href='../src/widgetry/geom.rs.html#59-62' title='goto source code'>[src]</a></h4><div class='docblock'><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
</div><h4 id='method.upload' class="method"><code>pub fn <a href='#method.upload' class='fnname'>upload</a>(self, ctx: &amp;<a class="struct" href="../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="struct" href="../widgetry/struct.Drawable.html" title="struct widgetry::Drawable">Drawable</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#66-68' title='goto source code'>[src]</a></h4><div class='docblock'><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
</div><h4 id='method.unshift' class="method"><code>pub fn <a href='#method.unshift' class='fnname'>unshift</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class='srclink' href='../src/widgetry/geom.rs.html#41-43' title='goto source code'>[src]</a></h4><div class='docblock'><p>Adds a single polygon to the front of the batch, painted according to <code>Fill</code></p>
</div><h4 id='method.extend' class="method"><code>pub fn <a href='#method.extend' class='fnname'>extend</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, polys: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;)</code><a class='srclink' href='../src/widgetry/geom.rs.html#46-51' title='goto source code'>[src]</a></h4><div class='docblock'><p>Applies one Fill to many polygons.</p>
</div><h4 id='method.append' class="method"><code>pub fn <a href='#method.append' class='fnname'>append</a>(&amp;mut self, other: <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a>)</code><a class='srclink' href='../src/widgetry/geom.rs.html#54-56' title='goto source code'>[src]</a></h4><div class='docblock'><p>Appends all colored polygons from another batch to the current one.</p>
</div><h4 id='method.consume' class="method"><code>pub fn <a href='#method.consume' class='fnname'>consume</a>(self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</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>&gt;</code><a class='srclink' href='../src/widgetry/geom.rs.html#59-61' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the colored polygons in this batch, destroying the batch.</p>
</div><h4 id='method.draw' class="method"><code>pub fn <a href='#method.draw' class='fnname'>draw</a>(self, g: &amp;mut <a class="struct" href="../widgetry/struct.GfxCtx.html" title="struct widgetry::GfxCtx">GfxCtx</a>&lt;'_&gt;)</code><a class='srclink' href='../src/widgetry/geom.rs.html#64-67' title='goto source code'>[src]</a></h4><div class='docblock'><p>Draws the batch, consuming it. Only use this for drawing things once.</p>
</div><h4 id='method.upload' class="method"><code>pub fn <a href='#method.upload' class='fnname'>upload</a>(self, ctx: &amp;<a class="struct" href="../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="struct" href="../widgetry/struct.Drawable.html" title="struct widgetry::Drawable">Drawable</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#71-73' title='goto source code'>[src]</a></h4><div class='docblock'><p>Upload the batch of polygons to the GPU, returning something that can be cheaply redrawn
many times later.</p>
</div><h4 id='method.batch' class="method"><code>pub fn <a href='#method.batch' class='fnname'>batch</a>(self) -&gt; <a class="struct" href="../widgetry/struct.Widget.html" title="struct widgetry::Widget">Widget</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#71-73' title='goto source code'>[src]</a></h4><div class='docblock'><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
</div><h4 id='method.to_btn' class="method"><code>pub fn <a href='#method.to_btn' class='fnname'>to_btn</a>(self, ctx: &amp;<a class="struct" href="../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="../widgetry/widgets/button/enum.BtnBuilder.html" title="enum widgetry::widgets::button::BtnBuilder">BtnBuilder</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#76-82' title='goto source code'>[src]</a></h4><div class='docblock'><p>Turn this batch into a button.</p>
</div><h4 id='method.get_bounds' class="method"><code>pub fn <a href='#method.get_bounds' class='fnname'>get_bounds</a>(&amp;self) -&gt; <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#85-94' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compute the bounds of all polygons in this batch.</p>
</div><h4 id='method.autocrop' class="method"><code>pub fn <a href='#method.autocrop' class='fnname'>autocrop</a>(self) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#97-106' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
</div><h4 id='method.unioned_polygon' class="method"><code>pub fn <a href='#method.unioned_polygon' class='fnname'>unioned_polygon</a>(&amp;self) -&gt; <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#109-115' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
</div><h4 id='method.is_empty' class="method"><code>pub(crate) fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#118-120' title='goto source code'>[src]</a></h4><div class='docblock'><p>True when the batch is empty.</p>
</div><h4 id='method.get_dims' class="method"><code>pub fn <a href='#method.get_dims' class='fnname'>get_dims</a>(&amp;self) -&gt; <a class="struct" href="../widgetry/struct.ScreenDims.html" title="struct widgetry::ScreenDims">ScreenDims</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#123-131' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the width and height of all geometry contained in the batch.</p>
</div><h4 id='method.from_svg_contents' class="method"><code>pub fn <a href='#method.from_svg_contents' class='fnname'>from_svg_contents</a>(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#134-139' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing a parsed SVG string.</p>
</div><h4 id='method.load_svg' class="method"><code>pub fn <a href='#method.load_svg' class='fnname'>load_svg</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>&gt;&gt;(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P, filename: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#142-144' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing an SVG from a file.</p>
</div><h4 id='method.color' class="method"><code>pub fn <a href='#method.color' class='fnname'>color</a>(self, transformation: <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#147-154' title='goto source code'>[src]</a></h4><div class='docblock'><p>Transforms all colors in a batch.</p>
</div><h4 id='method.centered_on' class="method"><code>pub fn <a href='#method.centered_on' class='fnname'>centered_on</a>(self, center: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#157-162' title='goto source code'>[src]</a></h4><div class='docblock'><p>Translates the batch to be centered on some point.</p>
</div><h4 id='method.translate' class="method"><code>pub fn <a href='#method.translate' class='fnname'>translate</a>(self, dx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, dy: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#165-170' title='goto source code'>[src]</a></h4><div class='docblock'><p>Translates the batch by some offset.</p>
</div><h4 id='method.rotate' class="method"><code>pub fn <a href='#method.rotate' class='fnname'>rotate</a>(self, angle: <a class="struct" href="../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#173-178' title='goto source code'>[src]</a></h4><div class='docblock'><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
</div><h4 id='method.rotate_around_batch_center' class="method"><code>pub fn <a href='#method.rotate_around_batch_center' class='fnname'>rotate_around_batch_center</a>(self, angle: <a class="struct" href="../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#181-187' title='goto source code'>[src]</a></h4><div class='docblock'><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
</div><h4 id='method.scale' class="method"><code>pub fn <a href='#method.scale' class='fnname'>scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#190-200' title='goto source code'>[src]</a></h4><div class='docblock'><p>Scales the batch by some factor.</p>
</div><h4 id='method.set_z_offset' class="method"><code>pub fn <a href='#method.set_z_offset' class='fnname'>set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#204-212' title='goto source code'>[src]</a></h4><div class='docblock'><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
</div><h4 id='method.batch' class="method"><code>pub fn <a href='#method.batch' class='fnname'>batch</a>(self) -&gt; <a class="struct" href="../widgetry/struct.Widget.html" title="struct widgetry::Widget">Widget</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#76-78' title='goto source code'>[src]</a></h4><div class='docblock'><p>Wrap in a Widget for layouting, so this batch can become part of a larger one.</p>
</div><h4 id='method.to_btn' class="method"><code>pub fn <a href='#method.to_btn' class='fnname'>to_btn</a>(self, ctx: &amp;<a class="struct" href="../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a>&lt;'_&gt;) -&gt; <a class="enum" href="../widgetry/widgets/button/enum.BtnBuilder.html" title="enum widgetry::widgets::button::BtnBuilder">BtnBuilder</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#81-83' title='goto source code'>[src]</a></h4><div class='docblock'><p>Turn this batch into a button, with the hovered version rewriting all colors.</p>
</div><h4 id='method.to_btn_custom' class="method"><code>pub fn <a href='#method.to_btn_custom' class='fnname'>to_btn_custom</a>(self, rewrite: <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a>) -&gt; <a class="enum" href="../widgetry/widgets/button/enum.BtnBuilder.html" title="enum widgetry::widgets::button::BtnBuilder">BtnBuilder</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#86-90' title='goto source code'>[src]</a></h4><div class='docblock'><p>Turn this batch into a button.</p>
</div><h4 id='method.get_bounds' class="method"><code>pub fn <a href='#method.get_bounds' class='fnname'>get_bounds</a>(&amp;self) -&gt; <a class="struct" href="../geom/bounds/struct.Bounds.html" title="struct geom::bounds::Bounds">Bounds</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#93-102' title='goto source code'>[src]</a></h4><div class='docblock'><p>Compute the bounds of all polygons in this batch.</p>
</div><h4 id='method.autocrop' class="method"><code>pub fn <a href='#method.autocrop' class='fnname'>autocrop</a>(self) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#105-114' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the top-left to 0, 0. Not sure exactly when this should be used.</p>
</div><h4 id='method.unioned_polygon' class="method"><code>pub fn <a href='#method.unioned_polygon' class='fnname'>unioned_polygon</a>(&amp;self) -&gt; <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#117-123' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a single polygon covering everything in this batch. Use to create a hitbox.</p>
</div><h4 id='method.is_empty' class="method"><code>pub(crate) fn <a href='#method.is_empty' class='fnname'>is_empty</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#126-128' title='goto source code'>[src]</a></h4><div class='docblock'><p>True when the batch is empty.</p>
</div><h4 id='method.get_dims' class="method"><code>pub fn <a href='#method.get_dims' class='fnname'>get_dims</a>(&amp;self) -&gt; <a class="struct" href="../widgetry/struct.ScreenDims.html" title="struct widgetry::ScreenDims">ScreenDims</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#131-139' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the width and height of all geometry contained in the batch.</p>
</div><h4 id='method.from_svg_contents' class="method"><code>pub fn <a href='#method.from_svg_contents' class='fnname'>from_svg_contents</a>(raw: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#142-147' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing a parsed SVG string.</p>
</div><h4 id='method.load_svg' class="method"><code>pub fn <a href='#method.load_svg' class='fnname'>load_svg</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>&gt;&gt;(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>P, filename: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#150-152' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a batch containing an SVG from a file.</p>
</div><h4 id='method.color' class="method"><code>pub fn <a href='#method.color' class='fnname'>color</a>(self, transformation: <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#155-162' title='goto source code'>[src]</a></h4><div class='docblock'><p>Transforms all colors in a batch.</p>
</div><h4 id='method.centered_on' class="method"><code>pub fn <a href='#method.centered_on' class='fnname'>centered_on</a>(self, center: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#165-170' title='goto source code'>[src]</a></h4><div class='docblock'><p>Translates the batch to be centered on some point.</p>
</div><h4 id='method.translate' class="method"><code>pub fn <a href='#method.translate' class='fnname'>translate</a>(self, dx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, dy: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#173-178' title='goto source code'>[src]</a></h4><div class='docblock'><p>Translates the batch by some offset.</p>
</div><h4 id='method.rotate' class="method"><code>pub fn <a href='#method.rotate' class='fnname'>rotate</a>(self, angle: <a class="struct" href="../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#181-186' title='goto source code'>[src]</a></h4><div class='docblock'><p>Rotates each polygon in the batch relative to the center of that polygon.</p>
</div><h4 id='method.rotate_around_batch_center' class="method"><code>pub fn <a href='#method.rotate_around_batch_center' class='fnname'>rotate_around_batch_center</a>(self, angle: <a class="struct" href="../geom/angle/struct.Angle.html" title="struct geom::angle::Angle">Angle</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#189-195' title='goto source code'>[src]</a></h4><div class='docblock'><p>Rotates each polygon in the batch relative to the center of the entire batch.</p>
</div><h4 id='method.scale' class="method"><code>pub fn <a href='#method.scale' class='fnname'>scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#198-208' title='goto source code'>[src]</a></h4><div class='docblock'><p>Scales the batch by some factor.</p>
</div><h4 id='method.set_z_offset' class="method"><code>pub fn <a href='#method.set_z_offset' class='fnname'>set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#212-220' title='goto source code'>[src]</a></h4><div class='docblock'><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
rendering on top.</p>
</div></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/widgetry/geom.rs.html#9' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#9' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E' class='impl'><code class='in-band'>impl&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt; for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E' class='anchor'></a><a class='srclink' href='../src/widgetry/geom.rs.html#215-223' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#217-222' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a batch of filled polygons.</p>
</div></div><h3 id='impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E' class='impl'><code class='in-band'>impl&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt; for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href='#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E' class='anchor'></a><a class='srclink' href='../src/widgetry/geom.rs.html#223-231' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class='srclink' href='../src/widgetry/geom.rs.html#225-230' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a batch of filled polygons.</p>
</div></div></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="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</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&lt;T&gt; <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>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' 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&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</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#217-221' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' 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>