mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
deploy: 524f42ab61
This commit is contained in:
parent
49dbea9f04
commit
9274640823
@ -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">☰</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'>−</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>
|
4
rustdoc/experiment/title/fn.level_btn.html
Normal file
4
rustdoc/experiment/title/fn.level_btn.html
Normal 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">☰</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'>−</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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> level: &<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br> idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> 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>
|
4
rustdoc/experiment/title/fn.link.html
Normal file
4
rustdoc/experiment/title/fn.link.html
Normal 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">☰</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'>−</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: &mut EventCtx<'_>, label: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, url: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> 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>
|
@ -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">☰</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'>−</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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> level: &<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br> idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> 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'>−</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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> level: &<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br> idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> 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>
|
@ -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">☰</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'>−</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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> level: &<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br> idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> 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'>−</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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>, <br> level: &<a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, <br> idx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><br>) -> 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>
|
@ -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">☰</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'>−</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'>−</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>
|
@ -1 +1 @@
|
||||
initSidebarItems({"fn":[["locked_level",""],["unlocked_level",""]],"struct":[["TitleScreen",""]]});
|
||||
initSidebarItems({"fn":[["level_btn",""],["link",""],["locked_level",""],["unlocked_level",""]],"struct":[["Credits",""],["TitleScreen",""]]});
|
37
rustdoc/experiment/title/struct.Credits.html
Normal file
37
rustdoc/experiment/title/struct.Credits.html
Normal 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">☰</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<SimpleApp<Session>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>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'>−</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: &mut EventCtx<'_>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>>></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<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>> 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> &mut self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> Transition<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>></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>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>)</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>(&self) -> 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>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
then be further <code>downcast</code> into <code>Box<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>
|
||||
</div><h4 id='method.into_any_rc' class="method hidden"><code>fn <a href='#method.into_any_rc' class='fnname'>into_any_rc</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html" title="struct alloc::rc::Rc">Rc</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Rc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Rc<Any></code>. <code>Rc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Rc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_rc">Read more</a></p>
|
||||
</div><h4 id='method.as_any' class="method hidden"><code>fn <a href='#method.as_any' class='fnname'>as_any</a>(&self) -> &(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&Any</code>'s vtable from <code>&Trait</code>'s. <a href="#tymethod.as_any">Read more</a></p>
|
||||
</div><h4 id='method.as_any_mut' class="method hidden"><code>fn <a href='#method.as_any_mut' class='fnname'>as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</code></h4><div class='docblock hidden'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&mut Any</code>'s vtable from <code>&mut Trait</code>'s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||||
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#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) -> 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<T> <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>) -> <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></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) -> <a class="struct" href="https://docs.rs/tracing/0.1.22/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></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<T> <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>) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></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) -> <a class="struct" href="https://docs.rs/tracing-futures/0.2.3/tracing_futures/struct.Instrumented.html" title="struct tracing_futures::Instrumented">Instrumented</a><Self></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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#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) -> 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<T> Same<T> 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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#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) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#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<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#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> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id='method.try_into' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#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<V, T> VZip<V> for T <span class="where fmt-newline">where<br> V: MultiLane<T>, </span></code><a href='#impl-VZip%3CV%3E' class='anchor'></a></h3><div class='impl-items'><h4 id='method.vzip' class="method hidden"><code>fn <a href='#method.vzip' class='fnname'>vzip</a>(self) -> V</code></h4></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -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">☰</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<SimpleApp<Session>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><p class='location'><a href='../index.html'>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'>−</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'>−</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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>>></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<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>> 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> &mut self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> Transition<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>></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>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>)</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> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>>></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<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>> 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> &mut self, <br> ctx: &mut EventCtx<'_>, <br> app: &mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>><br>) -> Transition<<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>></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>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a><<a class="struct" href="../../experiment/session/struct.Session.html" title="struct experiment::session::Session">Session</a>>)</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>(&self) -> 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>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
|
@ -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">☰</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'>−</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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Tue, 15 Dec 2020 21:10:54 +0000";</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'>−</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: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Tue, 15 Dec 2020 21:59:48 +0000";</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
@ -1,5 +1,5 @@
|
||||
(function() {var implementors = {};
|
||||
implementors["experiment"] = [{"text":"impl State<SimpleApp<Session>> for Strategize","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for Results","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for Picker","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for Game","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for TitleScreen","synthetic":false,"types":[]}];
|
||||
implementors["experiment"] = [{"text":"impl State<SimpleApp<Session>> for Strategize","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for Results","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for Picker","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for Game","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for TitleScreen","synthetic":false,"types":[]},{"text":"impl State<SimpleApp<Session>> for Credits","synthetic":false,"types":[]}];
|
||||
implementors["fifteen_min"] = [{"text":"impl State<SimpleApp<()>> for Viewer","synthetic":false,"types":[]}];
|
||||
implementors["game"] = [{"text":"impl State<App> for CutscenePlayer","synthetic":false,"types":[]},{"text":"impl State<App> for FYI","synthetic":false,"types":[]},{"text":"impl State<App> for ChallengesPicker","synthetic":false,"types":[]},{"text":"impl State<App> for Warping","synthetic":false,"types":[]},{"text":"impl State<App> for DebugWarp","synthetic":false,"types":[]},{"text":"impl State<App> for SimpleStateWrapper","synthetic":false,"types":[]},{"text":"impl State<App> for Viewer","synthetic":false,"types":[]},{"text":"impl State<App> for Floodfiller","synthetic":false,"types":[]},{"text":"impl State<App> for PathCounter","synthetic":false,"types":[]},{"text":"impl State<App> for PolygonDebugger","synthetic":false,"types":[]},{"text":"impl State<App> for DebugMode","synthetic":false,"types":[]},{"text":"impl State<App> for ScreenshotTest","synthetic":false,"types":[]},{"text":"impl State<App> for CollisionsViewer","synthetic":false,"types":[]},{"text":"impl State<App> for PopularDestinations","synthetic":false,"types":[]},{"text":"impl State<App> for ViewKML","synthetic":false,"types":[]},{"text":"impl State<App> for PolygonEditor","synthetic":false,"types":[]},{"text":"impl State<App> for ScenarioManager","synthetic":false,"types":[]},{"text":"impl State<App> for StoryMapEditor","synthetic":false,"types":[]},{"text":"impl State<App> for DevToolsMode","synthetic":false,"types":[]},{"text":"impl State<App> for BulkSelect","synthetic":false,"types":[]},{"text":"impl State<App> for BulkEdit","synthetic":false,"types":[]},{"text":"impl State<App> for ClusterTrafficSignalEditor","synthetic":false,"types":[]},{"text":"impl State<App> for RouteEditor","synthetic":false,"types":[]},{"text":"impl State<App> for SignalPicker","synthetic":false,"types":[]},{"text":"impl State<App> for PreviewTrafficSignal","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficSignalEditor","synthetic":false,"types":[]},{"text":"impl State<App> for ZoneEditor","synthetic":false,"types":[]},{"text":"impl State<App> for EditMode","synthetic":false,"types":[]},{"text":"impl State<App> for SaveEdits","synthetic":false,"types":[]},{"text":"impl State<App> for LoadEdits","synthetic":false,"types":[]},{"text":"impl State<App> for ConfirmDiscard","synthetic":false,"types":[]},{"text":"impl State<App> for PickLayer","synthetic":false,"types":[]},{"text":"impl State<App> for TitleScreen","synthetic":false,"types":[]},{"text":"impl State<App> for MainMenu","synthetic":false,"types":[]},{"text":"impl State<App> for About","synthetic":false,"types":[]},{"text":"impl State<App> for Proposals","synthetic":false,"types":[]},{"text":"impl State<App> for CommuterPatterns","synthetic":false,"types":[]},{"text":"impl<T: 'static, F: 'static, P: 'static + Fn(&mut EventCtx<'_>, &App, &Table<T, F>) -> Panel> State<App> for GenericTripTable<T, F, P>","synthetic":false,"types":[]},{"text":"impl State<App> for ActiveTraffic","synthetic":false,"types":[]},{"text":"impl State<App> for TransitRoutes","synthetic":false,"types":[]},{"text":"impl State<App> for TripSummaries","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficSignalDemand","synthetic":false,"types":[]},{"text":"impl State<App> for CensusGenerator","synthetic":false,"types":[]},{"text":"impl State<App> for AgentSpawner","synthetic":false,"types":[]},{"text":"impl State<App> for EditScenarioModifiers","synthetic":false,"types":[]},{"text":"impl State<App> for ChangeMode","synthetic":false,"types":[]},{"text":"impl State<App> for FinalScore","synthetic":false,"types":[]},{"text":"impl State<App> for TrafficRecorder","synthetic":false,"types":[]},{"text":"impl State<App> for JumpToTime","synthetic":false,"types":[]},{"text":"impl State<App> for JumpToDelay","synthetic":false,"types":[]},{"text":"impl State<App> for TimeWarpScreen","synthetic":false,"types":[]},{"text":"impl State<App> for SandboxMode","synthetic":false,"types":[]},{"text":"impl State<App> for BackToMainMenu","synthetic":false,"types":[]},{"text":"impl State<App> for SandboxLoader","synthetic":false,"types":[]}];
|
||||
implementors["map_editor"] = [{"text":"impl State<App> for MainState","synthetic":false,"types":[]}];
|
||||
|
File diff suppressed because one or more lines are too long
@ -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"><</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">"system/assets/tools/quit.svg"</span>)
|
||||
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">"quit"</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">"A/B STREET"</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">"15 Minute Santa"</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">"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">"Created by Dustin Carlino, Yuwen Li, & Michael Kirk"</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">"Santa made by @parallaxcreativedesign"</span>)
|
||||
.<span class="ident">build</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"open https://www.instagram.com/parallaxcreativedesign/"</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">"Credits"</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>),
|
||||
<span class="string">"Created by Dustin Carlino, Yuwen Li, & Michael Kirk"</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">"quit"</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Pop</span>;
|
||||
}
|
||||
<span class="string">"Credits"</span> <span class="op">=</span><span class="op">></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">></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">"open "</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">&</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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">level</span>: <span class="kw-2">&</span><span class="ident">Level</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">level</span>: <span class="kw-2">&</span><span class="ident">Level</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></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">"LEVEL {}"</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">&</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">&</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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">level</span>: <span class="kw-2">&</span><span class="ident">Level</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="ident">App</span>, <span class="ident">level</span>: <span class="kw-2">&</span><span class="ident">Level</span>, <span class="ident">idx</span>: <span class="ident">usize</span>) <span class="op">-</span><span class="op">></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">"LEVEL {}"</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">&</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">&</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">&</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">&</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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></span> <span class="ident">Box</span><span class="op"><</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op"><</span><span class="ident">App</span><span class="op">></span><span class="op">></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">"15 Minute Santa"</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">"Created by the A/B Street team"</span>,
|
||||
<span class="string">"https://abstreet.org"</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">"Lead: Dustin Carlino"</span>),
|
||||
<span class="ident">Line</span>(<span class="string">"Programming & game design: Michael Kirk"</span>),
|
||||
<span class="ident">Line</span>(<span class="string">"UI/UX: Yuwen Li"</span>),
|
||||
]).<span class="ident">draw</span>(<span class="ident">ctx</span>),
|
||||
<span class="ident">link</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"Santa made by @parallaxcreativedesign"</span>,
|
||||
<span class="string">"https://www.instagram.com/parallaxcreativedesign/"</span>,
|
||||
),
|
||||
<span class="ident">link</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
<span class="string">"Map data thanks to OpenStreetMap contributors"</span>,
|
||||
<span class="string">"https://www.openstreetmap.org/about"</span>),
|
||||
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">"Land use data from Seattle GeoData"</span>, <span class="string">"https://data-seattlecitygis.opendata.arcgis.com/datasets/current-land-use-zoning-detail"</span>),
|
||||
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">"Music by Royalty Free Music"</span>, <span class="string">"https://soundcloud.com/royaltyfreebackgroundmusic/creative-commons-music-4061"</span>),
|
||||
<span class="ident">link</span>(<span class="ident">ctx</span>, <span class="string">"Fonts and icons by various sources"</span>, <span class="string">"https://dabreegster.github.io/abstreet/howto/#data-source-licensing"</span>),
|
||||
<span class="ident">Btn</span>::<span class="ident">text_bg2</span>(<span class="string">"Back"</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">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">label</span>: <span class="kw-2">&</span><span class="ident">str</span>, <span class="ident">url</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></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">"open {}"</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"><</span><span class="ident">App</span><span class="op">></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">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">App</span>) <span class="op">-</span><span class="op">></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">></span> <span class="kw">match</span> <span class="ident">x</span>.<span class="ident">as_ref</span>() {
|
||||
<span class="string">"close"</span> <span class="op">|</span> <span class="string">"Back"</span> <span class="op">=</span><span class="op">></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">></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">"open "</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">></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">&</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&</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>
|
@ -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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.48.0 (7eac88abb 2020-11-16)"</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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Tue, 15 Dec 2020 21:10:54 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Tue, 15 Dec 2020 21:59:48 +0000"</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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -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"><</span><span class="ident">F</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">Fill</span><span class="op">></span><span class="op">></span>(<span class="kw-2">&</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"><</span><span class="ident">F</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">Fill</span><span class="op">></span><span class="op">></span>(<span class="kw-2">&</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"><</span><span class="ident">F</span>: <span class="ident">Into</span><span class="op"><</span><span class="ident">Fill</span><span class="op">></span><span class="op">></span>(<span class="kw-2">&</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"><</span><span class="ident">Polygon</span><span class="op">></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">&</span><span class="ident">EventCtx</span>) <span class="op">-</span><span class="op">></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">></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>)
|
||||
}
|
||||
|
@ -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">☰</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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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'>−</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'>−</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>, <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>(&self, c: <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><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>(&self, c: <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
|
@ -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">☰</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<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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'>−</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'>−</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>, <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>(&self, c: <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div><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>(&self, c: <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static></code></h4><div class='docblock hidden'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
|
@ -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">☰</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'>−</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'>−</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>
|
||||
|
@ -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">☰</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<Vec<(F, Polygon)>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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">☰</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<Vec<(F, Polygon)>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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'>−</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><<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>>,
|
||||
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><<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>></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>() -> <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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><<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>></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>() -> <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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><<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-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>(&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) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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>></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: &mut <a class="struct" href="../../widgetry/struct.GfxCtx.html" title="struct widgetry::GfxCtx">GfxCtx</a><'_>)</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: &<a class="struct" href="../../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a><'_>) -> <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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><<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#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>(&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) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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>></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: &mut <a class="struct" href="../../widgetry/struct.GfxCtx.html" title="struct widgetry::GfxCtx">GfxCtx</a><'_>)</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: &<a class="struct" href="../../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a><'_>) -> <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) -> <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: &<a class="struct" href="../../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a><'_>) -> <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>(&self) -> <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) -> <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>(&self) -> <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>(&self) -> <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>(&self) -> <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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>) -> <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><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>>>(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, filename: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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) -> <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: &<a class="struct" href="../../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a><'_>) -> <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>) -> <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>(&self) -> <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) -> <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>(&self) -> <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>(&self) -> <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>(&self) -> <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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>) -> <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><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>>>(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, filename: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>(&self) -> <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>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</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<F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="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>>> 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><<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>>) -> <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<F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="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>>> 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><<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>>) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>
|
||||
|
@ -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">☰</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<Vec<(F, Polygon)>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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">☰</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<Vec<(F, Polygon)>></a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Same%3CT%3E">Same<T></a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></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'>−</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><<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>>,
|
||||
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><<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>></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>() -> <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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><<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>></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>() -> <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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><<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-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>(&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) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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>></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: &mut <a class="struct" href="../widgetry/struct.GfxCtx.html" title="struct widgetry::GfxCtx">GfxCtx</a><'_>)</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: &<a class="struct" href="../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a><'_>) -> <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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>>(&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><<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#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>(&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) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<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>></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: &mut <a class="struct" href="../widgetry/struct.GfxCtx.html" title="struct widgetry::GfxCtx">GfxCtx</a><'_>)</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: &<a class="struct" href="../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a><'_>) -> <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) -> <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: &<a class="struct" href="../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a><'_>) -> <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>(&self) -> <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) -> <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>(&self) -> <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>(&self) -> <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>(&self) -> <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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>) -> <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><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>>>(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, filename: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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) -> <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: &<a class="struct" href="../widgetry/struct.EventCtx.html" title="struct widgetry::EventCtx">EventCtx</a><'_>) -> <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>) -> <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>(&self) -> <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) -> <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>(&self) -> <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>(&self) -> <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>(&self) -> <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><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>) -> <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><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="../widgetry/struct.Prerender.html" title="struct widgetry::Prerender">Prerender</a>>>(prerender: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P, filename: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>) -> <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>(&self) -> <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>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</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<F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="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>>> 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><<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>>) -> <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<F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="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>>> 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><<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>>) -> <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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#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>
|
||||
|
Loading…
Reference in New Issue
Block a user