This commit is contained in:
dabreegster 2021-01-01 21:06:40 +00:00
parent a35d9d2bbc
commit e3d6321ca6
45 changed files with 345 additions and 157 deletions

View File

@ -102,8 +102,8 @@ the event and immediately apply the transition. <a href="#method.panel_changed">
</div><h4 id="method.draw-2" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/challenges/cutscene.rs.html#321-324" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer-1" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy-1" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div><h3 id="impl-State%3CApp%3E-10" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></code><a href="#impl-State%3CApp%3E-10" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#755-775" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-10" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/mod.rs.html#756-773" 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-11" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/mod.rs.html#774" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div></div><h3 id="impl-State%3CApp%3E-10" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></code><a href="#impl-State%3CApp%3E-10" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#766-786" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-10" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/mod.rs.html#767-784" 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-11" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/mod.rs.html#785" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer-10" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy-10" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div><h3 id="impl-State%3CApp%3E-11" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/devtools/collisions/struct.CollisionsViewer.html" title="struct game::devtools::collisions::CollisionsViewer">CollisionsViewer</a></code><a href="#impl-State%3CApp%3E-11" class="anchor"></a><a class="srclink" href="../../src/game/devtools/collisions.rs.html#269-327" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-11" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/devtools/collisions.rs.html#270-302" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
@ -298,9 +298,9 @@ the event and immediately apply the transition. <a href="#method.panel_changed">
</div><h4 id="method.draw-9" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/polygons.rs.html#91-140" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer-8" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy-8" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div><h3 id="impl-State%3CApp%3E-9" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/struct.DebugMode.html" title="struct game::debug::DebugMode">DebugMode</a></code><a href="#impl-State%3CApp%3E-9" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#116-350" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-9" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/mod.rs.html#117-321" 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_baselayer-9" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code><a class="srclink" href="../../src/game/debug/mod.rs.html#323-325" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.draw-10" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/mod.rs.html#327-349" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div></div><h3 id="impl-State%3CApp%3E-9" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/struct.DebugMode.html" title="struct game::debug::DebugMode">DebugMode</a></code><a href="#impl-State%3CApp%3E-9" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#117-361" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.event-9" class="method hidden"><code>fn <a href="#method.event" class="fnname">event</a>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/mod.rs.html#118-332" 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_baselayer-9" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code><a class="srclink" href="../../src/game/debug/mod.rs.html#334-336" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.draw-10" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/mod.rs.html#338-360" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.on_destroy-9" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</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="../../game/app/struct.App.html" title="struct game::app::App">App</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="../../game/app/struct.App.html" title="struct game::app::App">App</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="../../game/app/struct.App.html" title="struct game::app::App">App</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="../../game/app/struct.App.html" title="struct game::app::App">App</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>

View File

@ -4,4 +4,4 @@
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/app.rs.html#558-561" title="goto source code">[src]</a></span><span class="in-band">Trait <a href="../index.html">game</a>::<wbr><a href="index.html">app</a>::<wbr><a class="trait" href="">ShowObject</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait ShowObject {
fn <a href="#tymethod.show" class="fnname">show</a>(&amp;self, obj: &amp;<a class="enum" href="../../map_gui/enum.ID.html" title="enum map_gui::ID">ID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class="item-spacer"></div> fn <a href="#tymethod.layers" class="fnname">layers</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a>;
}</pre></div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.show" class="method"><code>fn <a href="#tymethod.show" class="fnname">show</a>(&amp;self, obj: &amp;<a class="enum" href="../../map_gui/enum.ID.html" title="enum map_gui::ID">ID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><h3 id="tymethod.layers" class="method"><code>fn <a href="#tymethod.layers" class="fnname">layers</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code></h3></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-ShowObject" class="impl"><code class="in-band">impl ShowObject for <a class="struct" href="../../game/app/struct.ShowEverything.html" title="struct game::app::ShowEverything">ShowEverything</a></code><a href="#impl-ShowObject" class="anchor"></a><a class="srclink" href="../../src/game/app.rs.html#575-583" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.show" class="method hidden"><code>fn <a href="#method.show" class="fnname">show</a>(&amp;self, _: &amp;<a class="enum" href="../../map_gui/enum.ID.html" title="enum map_gui::ID">ID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/game/app.rs.html#576-578" title="goto source code">[src]</a></h4><h4 id="method.layers" class="method hidden"><code>fn <a href="#method.layers" class="fnname">layers</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code><a class="srclink" href="../../src/game/app.rs.html#580-582" title="goto source code">[src]</a></h4></div><h3 id="impl-ShowObject-1" class="impl"><code class="in-band">impl ShowObject for <a class="struct" href="../../game/debug/struct.DebugMode.html" title="struct game::debug::DebugMode">DebugMode</a></code><a href="#impl-ShowObject-1" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#352-370" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.show-1" class="method hidden"><code>fn <a href="#method.show-1" class="fnname">show</a>(&amp;self, obj: &amp;<a class="enum" href="../../map_gui/enum.ID.html" title="enum map_gui::ID">ID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/game/debug/mod.rs.html#353-365" title="goto source code">[src]</a></h4><h4 id="method.layers-1" class="method hidden"><code>fn <a href="#method.layers-1" class="fnname">layers</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code><a class="srclink" href="../../src/game/debug/mod.rs.html#367-369" title="goto source code">[src]</a></h4></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/game/app/trait.ShowObject.js" async></script></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>
}</pre></div><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.show" class="method"><code>fn <a href="#tymethod.show" class="fnname">show</a>(&amp;self, obj: &amp;<a class="enum" href="../../map_gui/enum.ID.html" title="enum map_gui::ID">ID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><h3 id="tymethod.layers" class="method"><code>fn <a href="#tymethod.layers" class="fnname">layers</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code></h3></div><span class="loading-content">Loading content...</span><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><h3 id="impl-ShowObject" class="impl"><code class="in-band">impl ShowObject for <a class="struct" href="../../game/app/struct.ShowEverything.html" title="struct game::app::ShowEverything">ShowEverything</a></code><a href="#impl-ShowObject" class="anchor"></a><a class="srclink" href="../../src/game/app.rs.html#575-583" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.show" class="method hidden"><code>fn <a href="#method.show" class="fnname">show</a>(&amp;self, _: &amp;<a class="enum" href="../../map_gui/enum.ID.html" title="enum map_gui::ID">ID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/game/app.rs.html#576-578" title="goto source code">[src]</a></h4><h4 id="method.layers" class="method hidden"><code>fn <a href="#method.layers" class="fnname">layers</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code><a class="srclink" href="../../src/game/app.rs.html#580-582" title="goto source code">[src]</a></h4></div><h3 id="impl-ShowObject-1" class="impl"><code class="in-band">impl ShowObject for <a class="struct" href="../../game/debug/struct.DebugMode.html" title="struct game::debug::DebugMode">DebugMode</a></code><a href="#impl-ShowObject-1" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#363-381" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.show-1" class="method hidden"><code>fn <a href="#method.show-1" class="fnname">show</a>(&amp;self, obj: &amp;<a class="enum" href="../../map_gui/enum.ID.html" title="enum map_gui::ID">ID</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/game/debug/mod.rs.html#364-376" title="goto source code">[src]</a></h4><h4 id="method.layers-1" class="method hidden"><code>fn <a href="#method.layers-1" class="fnname">layers</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../game/app/struct.ShowLayers.html" title="struct game::app::ShowLayers">ShowLayers</a></code><a class="srclink" href="../../src/game/debug/mod.rs.html#378-380" title="goto source code">[src]</a></h4></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/game/app/trait.ShowObject.js" async></script></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>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `calc_all_routes` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, calc_all_routes"><title>game::debug::calc_all_routes - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../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">debug</a></p><script>window.sidebarCurrent = {name: "calc_all_routes", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#422-443" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">calc_all_routes</a></span></h1><pre class="rust fn">fn calc_all_routes(ctx: &amp;EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, Drawable<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></pre></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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#433-454" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">calc_all_routes</a></span></h1><pre class="rust fn">fn calc_all_routes(ctx: &amp;EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, Drawable<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></pre></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>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `diff_tags` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, diff_tags"><title>game::debug::diff_tags - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../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">debug</a></p><script>window.sidebarCurrent = {name: "diff_tags", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#705-720" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">diff_tags</a></span></h1><pre class="rust fn">fn diff_tags(t1: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>, t2: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>)</pre></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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#716-731" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">diff_tags</a></span></h1><pre class="rust fn">fn diff_tags(t1: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>, t2: &amp;<a class="struct" href="../../abstutil/collections/struct.Tags.html" title="struct abstutil::collections::Tags">Tags</a>)</pre></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>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `find_bad_signals` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, find_bad_signals"><title>game::debug::find_bad_signals - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../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">debug</a></p><script>window.sidebarCurrent = {name: "find_bad_signals", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#650-666" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">find_bad_signals</a></span></h1><pre class="rust fn">fn find_bad_signals(app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#661-677" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">find_bad_signals</a></span></h1><pre class="rust fn">fn find_bad_signals(app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></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>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `find_degenerate_roads` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, find_degenerate_roads"><title>game::debug::find_degenerate_roads - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../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">debug</a></p><script>window.sidebarCurrent = {name: "find_degenerate_roads", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#668-703" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">find_degenerate_roads</a></span></h1><pre class="rust fn">fn find_degenerate_roads(app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#679-714" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">find_degenerate_roads</a></span></h1><pre class="rust fn">fn find_degenerate_roads(app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></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>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `find_large_intersections` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, find_large_intersections"><title>game::debug::find_large_intersections - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../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">debug</a></p><script>window.sidebarCurrent = {name: "find_large_intersections", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#722-730" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">find_large_intersections</a></span></h1><pre class="rust fn">fn find_large_intersections(app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#733-741" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">find_large_intersections</a></span></h1><pre class="rust fn">fn find_large_intersections(app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></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>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `screenshot_everything` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, screenshot_everything"><title>game::debug::screenshot_everything - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../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">debug</a></p><script>window.sidebarCurrent = {name: "screenshot_everything", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#777-787" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">screenshot_everything</a></span></h1><pre class="rust fn">fn screenshot_everything(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#788-798" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">screenshot_everything</a></span></h1><pre class="rust fn">fn screenshot_everything(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</pre></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>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `search_osm` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, search_osm"><title>game::debug::search_osm - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../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">debug</a></p><script>window.sidebarCurrent = {name: "search_osm", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#372-414" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">search_osm</a></span></h1><pre class="rust fn">fn search_osm(<br>&nbsp;&nbsp;&nbsp;&nbsp;filter: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</pre></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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#383-425" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="fn" href="">search_osm</a></span></h1><pre class="rust fn">fn search_osm(<br>&nbsp;&nbsp;&nbsp;&nbsp;filter: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</pre></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>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `debug` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, debug"><title>game::debug - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module debug</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">game</a></p><script>window.sidebarCurrent = {name: "debug", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#1-787" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="">debug</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#1-798" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="">debug</a></span></h1><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="blocked_by/index.html" title="game::debug::blocked_by mod">blocked_by</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="floodfill/index.html" title="game::debug::floodfill mod">floodfill</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="objects/index.html" title="game::debug::objects mod">objects</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="path_counter/index.html" title="game::debug::path_counter mod">path_counter</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="polygons/index.html" title="game::debug::polygons mod">polygons</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="shared_row/index.html" title="game::debug::shared_row mod">shared_row</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="streetmix/index.html" title="game::debug::streetmix mod">streetmix</a></td><td class="docblock-short"></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Actions.html" title="game::debug::Actions struct">Actions</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.DebugMode.html" title="game::debug::DebugMode struct">DebugMode</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.ScreenshotTest.html" title="game::debug::ScreenshotTest struct">ScreenshotTest</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.SearchResults.html" title="game::debug::SearchResults struct">SearchResults</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.calc_all_routes.html" title="game::debug::calc_all_routes fn">calc_all_routes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.diff_tags.html" title="game::debug::diff_tags fn">diff_tags</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.find_bad_signals.html" title="game::debug::find_bad_signals fn">find_bad_signals</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.find_degenerate_roads.html" title="game::debug::find_degenerate_roads fn">find_degenerate_roads</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.find_large_intersections.html" title="game::debug::find_large_intersections fn">find_large_intersections</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.screenshot_everything.html" title="game::debug::screenshot_everything fn">screenshot_everything</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.search_osm.html" title="game::debug::search_osm fn">search_osm</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 = "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

View File

@ -1,12 +1,12 @@
<!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 `ScreenshotTest` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ScreenshotTest"><title>game::debug::ScreenshotTest - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct ScreenshotTest</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.screenshot_done">screenshot_done</a><a href="#structfield.todo_maps">todo_maps</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%3CApp%3E">State&lt;App&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class="location"><a href="../index.html">game</a>::<wbr><a href="index.html">debug</a></p><script>window.sidebarCurrent = {name: "ScreenshotTest", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#734-737" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="struct" href="">ScreenshotTest</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct ScreenshotTest {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#745-748" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="struct" href="">ScreenshotTest</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct ScreenshotTest {
todo_maps: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a>&gt;,
screenshot_done: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.todo_maps" class="structfield small-section-header"><a href="#structfield.todo_maps" class="anchor field"></a><code>todo_maps: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a>&gt;</code></span><span id="structfield.screenshot_done" class="structfield small-section-header"><a href="#structfield.screenshot_done" class="anchor field"></a><code>screenshot_done: <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="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#739-753" 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>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;todo_maps: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</code><a class="srclink" href="../../src/game/debug/mod.rs.html#740-752" 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%3CApp%3E" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#755-775" 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>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/mod.rs.html#756-773" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/mod.rs.html#774" 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.todo_maps" class="structfield small-section-header"><a href="#structfield.todo_maps" class="anchor field"></a><code>todo_maps: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a>&gt;</code></span><span id="structfield.screenshot_done" class="structfield small-section-header"><a href="#structfield.screenshot_done" class="anchor field"></a><code>screenshot_done: <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="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#750-764" 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>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;todo_maps: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../abstutil/abst_paths/struct.MapName.html" title="struct abstutil::abst_paths::MapName">MapName</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</code><a class="srclink" href="../../src/game/debug/mod.rs.html#751-763" 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%3CApp%3E" class="impl"><code class="in-band">impl State&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></code><a href="#impl-State%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/game/debug/mod.rs.html#766-786" 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>(&amp;mut self, ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/mod.rs.html#767-784" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, _: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/mod.rs.html#785" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id="method.draw_baselayer" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id="method.on_destroy" class="method hidden"><code>fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</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="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</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="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</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="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</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="../../game/debug/struct.ScreenshotTest.html" title="struct game::debug::ScreenshotTest">ScreenshotTest</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

View File

@ -1,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 `SearchResults` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, SearchResults"><title>game::debug::SearchResults - 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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct SearchResults</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.draw">draw</a><a href="#structfield.num_matches">num_matches</a><a href="#structfield.query">query</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class="location"><a href="../index.html">game</a>::<wbr><a href="index.html">debug</a></p><script>window.sidebarCurrent = {name: "SearchResults", 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!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#416-420" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="struct" href="">SearchResults</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct SearchResults {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/game/debug/mod.rs.html#427-431" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">debug</a>::<wbr><a class="struct" href="">SearchResults</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">struct SearchResults {
query: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>,
num_matches: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
draw: Drawable,

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><script>window.sidebarCurrent = {name: "BUILT_TIME_UTC", ty: "constant", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-b5501e76eef510ad/out/built.rs.html#53" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Fri, 01 Jan 2021 00:35:17 +0000&quot;;</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-b5501e76eef510ad/out/built.rs.html#53" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Fri, 01 Jan 2021 21:03:56 +0000&quot;;</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `calculate_driving_lines` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, calculate_driving_lines"><title>map_gui::render::lane::calculate_driving_lines - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a></p><script>window.sidebarCurrent = {name: "calculate_driving_lines", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#290-310" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_driving_lines</a></span></h1><pre class="rust fn">fn calculate_driving_lines(lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>, parent: &amp;<a class="struct" href="../../../map_model/objects/road/struct.Road.html" title="struct map_model::objects::road::Road">Road</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#287-307" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_driving_lines</a></span></h1><pre class="rust fn">fn calculate_driving_lines(lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>, parent: &amp;<a class="struct" href="../../../map_model/objects/road/struct.Road.html" title="struct map_model::objects::road::Road">Road</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `calculate_one_way_markings` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, calculate_one_way_markings"><title>map_gui::render::lane::calculate_one_way_markings - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a></p><script>window.sidebarCurrent = {name: "calculate_one_way_markings", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#369-400" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_one_way_markings</a></span></h1><pre class="rust fn">fn calculate_one_way_markings(lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>, parent: &amp;<a class="struct" href="../../../map_model/objects/road/struct.Road.html" title="struct map_model::objects::road::Road">Road</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#366-397" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_one_way_markings</a></span></h1><pre class="rust fn">fn calculate_one_way_markings(lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>, parent: &amp;<a class="struct" href="../../../map_model/objects/road/struct.Road.html" title="struct map_model::objects::road::Road">Road</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `calculate_parking_lines` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, calculate_parking_lines"><title>map_gui::render::lane::calculate_parking_lines - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a></p><script>window.sidebarCurrent = {name: "calculate_parking_lines", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#252-285" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_parking_lines</a></span></h1><pre class="rust fn">fn calculate_parking_lines(lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#249-282" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_parking_lines</a></span></h1><pre class="rust fn">fn calculate_parking_lines(lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `calculate_sidewalk_lines` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, calculate_sidewalk_lines"><title>map_gui::render::lane::calculate_sidewalk_lines - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a></p><script>window.sidebarCurrent = {name: "calculate_sidewalk_lines", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#231-250" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_sidewalk_lines</a></span></h1><pre class="rust fn">fn calculate_sidewalk_lines(lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#228-247" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_sidewalk_lines</a></span></h1><pre class="rust fn">fn calculate_sidewalk_lines(lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `calculate_turn_markings` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, calculate_turn_markings"><title>map_gui::render::lane::calculate_turn_markings - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a></p><script>window.sidebarCurrent = {name: "calculate_turn_markings", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#312-367" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_turn_markings</a></span></h1><pre class="rust fn">fn calculate_turn_markings(map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#309-364" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">calculate_turn_markings</a></span></h1><pre class="rust fn">fn calculate_turn_markings(map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, lane: &amp;<a class="struct" href="../../../map_model/objects/lane/struct.Lane.html" title="struct map_model::objects::lane::Lane">Lane</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `perp_line` fn in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, perp_line"><title>map_gui::render::lane::perp_line - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/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">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a></p><script>window.sidebarCurrent = {name: "perp_line", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#225-229" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">perp_line</a></span></h1><pre class="rust fn">fn perp_line(l: <a class="struct" href="../../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a>, length: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>) -&gt; <a class="struct" href="../../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#222-226" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a href="index.html">lane</a>::<wbr><a class="fn" href="">perp_line</a></span></h1><pre class="rust fn">fn perp_line(l: <a class="struct" href="../../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a>, length: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>) -&gt; <a class="struct" href="../../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `lane` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, lane"><title>map_gui::render::lane - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module lane</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">map_gui</a>::<wbr><a href="../index.html">render</a></p><script>window.sidebarCurrent = {name: "lane", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#1-400" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a class="mod" href="">lane</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/lane.rs.html#1-397" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a class="mod" href="">lane</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.DrawLane.html" title="map_gui::render::lane::DrawLane struct">DrawLane</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.calculate_driving_lines.html" title="map_gui::render::lane::calculate_driving_lines fn">calculate_driving_lines</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.calculate_one_way_markings.html" title="map_gui::render::lane::calculate_one_way_markings fn">calculate_one_way_markings</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.calculate_parking_lines.html" title="map_gui::render::lane::calculate_parking_lines fn">calculate_parking_lines</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.calculate_sidewalk_lines.html" title="map_gui::render::lane::calculate_sidewalk_lines fn">calculate_sidewalk_lines</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.calculate_turn_markings.html" title="map_gui::render::lane::calculate_turn_markings fn">calculate_turn_markings</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.perp_line.html" title="map_gui::render::lane::perp_line fn">perp_line</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 = "map_gui";</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

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `map` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, map"><title>map_gui::render::map - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module map</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a></p><script>window.sidebarCurrent = {name: "map", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/map.rs.html#1-382" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a class="mod" href="">map</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/map.rs.html#1-436" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a class="mod" href="">map</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.DrawMap.html" title="map_gui::render::map::DrawMap struct">DrawMap</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 = "map_gui";</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

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `parking_lot` mod in crate `map_gui`."><meta name="keywords" content="rust, rustlang, rust-lang, parking_lot"><title>map_gui::render::parking_lot - 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 id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module parking_lot</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a></p><script>window.sidebarCurrent = {name: "parking_lot", 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!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/parking_lot.rs.html#1-122" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a class="mod" href="">parking_lot</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/map_gui/render/parking_lot.rs.html#1-126" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">map_gui</a>::<wbr><a href="../index.html">render</a>::<wbr><a class="mod" href="">parking_lot</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.DrawParkingLot.html" title="map_gui::render::parking_lot::DrawParkingLot struct">DrawParkingLot</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 = "map_gui";</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

View File

@ -788,6 +788,17 @@
<span id="785">785</span>
<span id="786">786</span>
<span id="787">787</span>
<span id="788">788</span>
<span id="789">789</span>
<span id="790">790</span>
<span id="791">791</span>
<span id="792">792</span>
<span id="793">793</span>
<span id="794">794</span>
<span id="795">795</span>
<span id="796">796</span>
<span id="797">797</span>
<span id="798">798</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashSet</span>;
@ -795,7 +806,7 @@
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Pt2D</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">load</span>::<span class="ident">MapLoader</span>;
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">options</span>::<span class="ident">OptionsPanel</span>;
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">render</span>::{<span class="ident">calculate_corners</span>, <span class="ident">DrawOptions</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">render</span>::{<span class="ident">calculate_corners</span>, <span class="ident">DrawMap</span>, <span class="ident">DrawOptions</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">ChooseSomething</span>, <span class="ident">PopupMsg</span>, <span class="ident">PromptInput</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">ID</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">osm</span>, <span class="ident">ControlTrafficSignal</span>, <span class="ident">IntersectionID</span>, <span class="ident">NORMAL_LANE_THICKNESS</span>};
@ -862,6 +873,7 @@
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;find large intersections&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>),
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;sim internal stats&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="prelude-val">None</span>),
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;blocked-by graph&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="ident">Key</span>::<span class="ident">B</span>),
<span class="ident">Btn</span>::<span class="ident">text_fg</span>(<span class="string">&quot;render to GeoJSON&quot;</span>).<span class="ident">build_def</span>(<span class="ident">ctx</span>, <span class="ident">Key</span>::<span class="ident">G</span>),
]),
<span class="ident">Text</span>::<span class="ident">from_all</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Hold &quot;</span>),
@ -1048,6 +1060,16 @@
<span class="string">&quot;blocked-by graph&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">return</span> <span class="ident">Transition</span>::<span class="ident">Push</span>(<span class="ident">blocked_by</span>::<span class="ident">Viewer</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>));
}
<span class="string">&quot;render to GeoJSON&quot;</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">DrawMap</span>::<span class="ident">zoomed_batch</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="kw">let</span> <span class="ident">features</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">to_geojson</span>(<span class="prelude-val">Some</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_gps_bounds</span>()));
<span class="kw">let</span> <span class="ident">geojson</span> <span class="op">=</span> <span class="ident">geojson</span>::<span class="ident">GeoJson</span>::<span class="ident">from</span>(<span class="ident">geojson</span>::<span class="ident">FeatureCollection</span> {
<span class="ident">bbox</span>: <span class="prelude-val">None</span>,
<span class="ident">features</span>,
<span class="ident">foreign_members</span>: <span class="prelude-val">None</span>,
});
<span class="ident">abstutil</span>::<span class="ident">write_json</span>(<span class="string">&quot;rendered_map.json&quot;</span>.<span class="ident">to_string</span>(), <span class="kw-2">&amp;</span><span class="ident">geojson</span>);
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable</span><span class="macro">!</span>(),
},
<span class="ident">Outcome</span>::<span class="ident">Changed</span> <span class="op">=</span><span class="op">&gt;</span> {

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.49.0 (e1884a8e3 2020-12-29)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Fri, 01 Jan 2021 00:35:17 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Fri, 01 Jan 2021 21:03:56 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -486,7 +486,7 @@
<span class="ident">Direction</span>, <span class="ident">DrivingSide</span>, <span class="ident">Intersection</span>, <span class="ident">IntersectionID</span>, <span class="ident">IntersectionType</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">Road</span>,
<span class="ident">RoadWithStopSign</span>, <span class="ident">Turn</span>, <span class="ident">TurnType</span>, <span class="ident">SIDEWALK_THICKNESS</span>,
};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">RewriteColor</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Prerender</span>, <span class="ident">RewriteColor</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">colors</span>::<span class="ident">ColorScheme</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::{
@ -517,7 +517,7 @@
<span class="kw-2">*</span><span class="self">self</span>.<span class="ident">draw_traffic_signal</span>.<span class="ident">borrow_mut</span>() <span class="op">=</span> <span class="prelude-val">None</span>;
}
<span class="kw">fn</span> <span class="ident">render</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">dyn</span> <span class="ident">AppLike</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Drawable</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">render</span><span class="op">&lt;</span><span class="ident">P</span>: <span class="ident">AsRef</span><span class="op">&lt;</span><span class="ident">Prerender</span><span class="op">&gt;</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">prerender</span>: <span class="kw-2">&amp;</span><span class="ident">P</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">dyn</span> <span class="ident">AppLike</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>();
<span class="kw">let</span> <span class="ident">i</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="self">self</span>.<span class="ident">id</span>);
@ -575,7 +575,7 @@
<span class="ident">IntersectionType</span>::<span class="ident">Construction</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="comment">// TODO Centering seems weird</span>
<span class="ident">default_geom</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">g</span>, <span class="string">&quot;system/assets/map/under_construction.svg&quot;</span>)
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">prerender</span>, <span class="string">&quot;system/assets/map/under_construction.svg&quot;</span>)
.<span class="ident">scale</span>(<span class="number">0.08</span>)
.<span class="ident">centered_on</span>(<span class="ident">i</span>.<span class="ident">polygon</span>.<span class="ident">center</span>()),
);
@ -588,7 +588,7 @@
<span class="ident">default_geom</span> <span class="op">=</span> <span class="ident">default_geom</span>.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAlpha</span>(<span class="number">0.5</span>));
}
<span class="ident">g</span>.<span class="ident">upload</span>(<span class="ident">default_geom</span>)
<span class="ident">default_geom</span>
}
<span class="comment">// Returns the (octagon, pole) if there&#39;s room to draw it.</span>
@ -635,7 +635,7 @@
<span class="comment">// exhaustively see every intersection during a single session</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">draw</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">draw_default</span>.<span class="ident">borrow_mut</span>();
<span class="kw">if</span> <span class="ident">draw</span>.<span class="ident">is_none</span>() {
<span class="kw-2">*</span><span class="ident">draw</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">render</span>(<span class="ident">g</span>, <span class="ident">app</span>));
<span class="kw-2">*</span><span class="ident">draw</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">g</span>.<span class="ident">upload</span>(<span class="self">self</span>.<span class="ident">render</span>(<span class="ident">g</span>, <span class="ident">app</span>)));
}
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>());

View File

@ -398,9 +398,6 @@
<span id="395">395</span>
<span id="396">396</span>
<span id="397">397</span>
<span id="398">398</span>
<span id="399">399</span>
<span id="400">400</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cell</span>::<span class="ident">RefCell</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
@ -409,7 +406,7 @@
<span class="kw">use</span> <span class="ident">map_model</span>::{
<span class="ident">Direction</span>, <span class="ident">DrivingSide</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">Road</span>, <span class="ident">RoadID</span>, <span class="ident">TurnID</span>, <span class="ident">PARKING_SPOT_LENGTH</span>,
};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Drawable</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">RewriteColor</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Drawable</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">Prerender</span>, <span class="ident">RewriteColor</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">render</span>::{<span class="ident">DrawOptions</span>, <span class="ident">Renderable</span>, <span class="ident">OUTLINE_THICKNESS</span>};
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">AppLike</span>, <span class="ident">ID</span>};
@ -436,14 +433,14 @@
<span class="kw-2">*</span><span class="self">self</span>.<span class="ident">draw_default</span>.<span class="ident">borrow_mut</span>() <span class="op">=</span> <span class="prelude-val">None</span>;
}
<span class="kw">fn</span> <span class="ident">render</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">dyn</span> <span class="ident">AppLike</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Drawable</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">render</span><span class="op">&lt;</span><span class="ident">P</span>: <span class="ident">AsRef</span><span class="op">&lt;</span><span class="ident">Prerender</span><span class="op">&gt;</span><span class="op">&gt;</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">prerender</span>: <span class="kw-2">&amp;</span><span class="ident">P</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">dyn</span> <span class="ident">AppLike</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>();
<span class="kw">let</span> <span class="ident">lane</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_l</span>(<span class="self">self</span>.<span class="ident">id</span>);
<span class="kw">let</span> <span class="ident">road</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="ident">lane</span>.<span class="ident">parent</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">draw</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">if</span> <span class="op">!</span><span class="ident">lane</span>.<span class="ident">is_light_rail</span>() {
<span class="ident">draw</span>.<span class="ident">push</span>(
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>()
.<span class="ident">zoomed_road_surface</span>(<span class="ident">lane</span>.<span class="ident">lane_type</span>, <span class="ident">road</span>.<span class="ident">get_rank</span>()),
<span class="self">self</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>(),
@ -453,18 +450,18 @@
<span class="kw">match</span> <span class="ident">lane</span>.<span class="ident">lane_type</span> {
<span class="ident">LaneType</span>::<span class="ident">Sidewalk</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">c</span>) <span class="op">=</span> <span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">sidewalk_lines</span> {
<span class="ident">draw</span>.<span class="ident">extend</span>(<span class="ident">c</span>, <span class="ident">calculate_sidewalk_lines</span>(<span class="ident">lane</span>));
<span class="ident">batch</span>.<span class="ident">extend</span>(<span class="ident">c</span>, <span class="ident">calculate_sidewalk_lines</span>(<span class="ident">lane</span>));
} <span class="kw">else</span> {
<span class="comment">// Otherwise, draw a border at both edges</span>
<span class="kw">let</span> <span class="ident">width</span> <span class="op">=</span> <span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">0.2</span>);
<span class="kw">let</span> <span class="ident">shift</span> <span class="op">=</span> (<span class="ident">lane</span>.<span class="ident">width</span> <span class="op">-</span> <span class="ident">width</span>) <span class="op">/</span> <span class="number">2.0</span>;
<span class="ident">draw</span>.<span class="ident">push</span>(
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">general_road_marking</span>,
<span class="ident">lane</span>.<span class="ident">lane_center_pts</span>
.<span class="ident">must_shift_right</span>(<span class="ident">shift</span>)
.<span class="ident">make_polygons</span>(<span class="ident">width</span>),
);
<span class="ident">draw</span>.<span class="ident">push</span>(
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">general_road_marking</span>,
<span class="ident">lane</span>.<span class="ident">lane_center_pts</span>
.<span class="ident">must_shift_left</span>(<span class="ident">shift</span>)
@ -474,23 +471,23 @@
}
<span class="ident">LaneType</span>::<span class="ident">Shoulder</span> <span class="op">=</span><span class="op">&gt;</span> {}
<span class="ident">LaneType</span>::<span class="ident">Parking</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">draw</span>.<span class="ident">extend</span>(<span class="ident">general_road_marking</span>, <span class="ident">calculate_parking_lines</span>(<span class="ident">lane</span>, <span class="ident">map</span>));
<span class="ident">batch</span>.<span class="ident">extend</span>(<span class="ident">general_road_marking</span>, <span class="ident">calculate_parking_lines</span>(<span class="ident">lane</span>, <span class="ident">map</span>));
}
<span class="ident">LaneType</span>::<span class="ident">Driving</span> <span class="op">|</span> <span class="ident">LaneType</span>::<span class="ident">Bus</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">draw</span>.<span class="ident">extend</span>(<span class="ident">general_road_marking</span>, <span class="ident">calculate_driving_lines</span>(<span class="ident">lane</span>, <span class="ident">road</span>));
<span class="ident">draw</span>.<span class="ident">extend</span>(<span class="ident">general_road_marking</span>, <span class="ident">calculate_turn_markings</span>(<span class="ident">map</span>, <span class="ident">lane</span>));
<span class="ident">draw</span>.<span class="ident">extend</span>(<span class="ident">general_road_marking</span>, <span class="ident">calculate_one_way_markings</span>(<span class="ident">lane</span>, <span class="ident">road</span>));
<span class="ident">batch</span>.<span class="ident">extend</span>(<span class="ident">general_road_marking</span>, <span class="ident">calculate_driving_lines</span>(<span class="ident">lane</span>, <span class="ident">road</span>));
<span class="ident">batch</span>.<span class="ident">extend</span>(<span class="ident">general_road_marking</span>, <span class="ident">calculate_turn_markings</span>(<span class="ident">map</span>, <span class="ident">lane</span>));
<span class="ident">batch</span>.<span class="ident">extend</span>(<span class="ident">general_road_marking</span>, <span class="ident">calculate_one_way_markings</span>(<span class="ident">lane</span>, <span class="ident">road</span>));
}
<span class="ident">LaneType</span>::<span class="ident">Biking</span> <span class="op">=</span><span class="op">&gt;</span> {}
<span class="ident">LaneType</span>::<span class="ident">SharedLeftTurn</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">thickness</span> <span class="op">=</span> <span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">0.25</span>);
<span class="ident">draw</span>.<span class="ident">push</span>(
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">road_center_line</span>(<span class="ident">road</span>.<span class="ident">get_rank</span>()),
<span class="ident">lane</span>.<span class="ident">lane_center_pts</span>
.<span class="ident">must_shift_right</span>((<span class="ident">lane</span>.<span class="ident">width</span> <span class="op">-</span> <span class="ident">thickness</span>) <span class="op">/</span> <span class="number">2.0</span>)
.<span class="ident">make_polygons</span>(<span class="ident">thickness</span>),
);
<span class="ident">draw</span>.<span class="ident">push</span>(
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">road_center_line</span>(<span class="ident">road</span>.<span class="ident">get_rank</span>()),
<span class="ident">lane</span>.<span class="ident">lane_center_pts</span>
.<span class="ident">must_shift_left</span>((<span class="ident">lane</span>.<span class="ident">width</span> <span class="op">-</span> <span class="ident">thickness</span>) <span class="op">/</span> <span class="number">2.0</span>)
@ -500,13 +497,13 @@
<span class="ident">LaneType</span>::<span class="ident">Construction</span> <span class="op">=</span><span class="op">&gt;</span> {}
<span class="ident">LaneType</span>::<span class="ident">LightRail</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">track_width</span> <span class="op">=</span> <span class="ident">lane</span>.<span class="ident">width</span> <span class="op">/</span> <span class="number">4.0</span>;
<span class="ident">draw</span>.<span class="ident">push</span>(
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">light_rail_track</span>,
<span class="ident">lane</span>.<span class="ident">lane_center_pts</span>
.<span class="ident">must_shift_right</span>((<span class="ident">lane</span>.<span class="ident">width</span> <span class="op">-</span> <span class="ident">track_width</span>) <span class="op">/</span> <span class="number">2.5</span>)
.<span class="ident">make_polygons</span>(<span class="ident">track_width</span>),
);
<span class="ident">draw</span>.<span class="ident">push</span>(
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">light_rail_track</span>,
<span class="ident">lane</span>.<span class="ident">lane_center_pts</span>
.<span class="ident">must_shift_left</span>((<span class="ident">lane</span>.<span class="ident">width</span> <span class="op">-</span> <span class="ident">track_width</span>) <span class="op">/</span> <span class="number">2.5</span>)
@ -520,7 +517,7 @@
<span class="kw">let</span> (<span class="ident">pt</span>, <span class="ident">angle</span>) <span class="op">=</span> <span class="ident">lane</span>.<span class="ident">lane_center_pts</span>.<span class="ident">must_dist_along</span>(<span class="ident">dist_along</span>);
<span class="comment">// Reuse perp_line. Project away an arbitrary amount</span>
<span class="kw">let</span> <span class="ident">pt2</span> <span class="op">=</span> <span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">1.0</span>), <span class="ident">angle</span>);
<span class="ident">draw</span>.<span class="ident">push</span>(
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">light_rail_track</span>,
<span class="ident">perp_line</span>(<span class="ident">Line</span>::<span class="ident">must_new</span>(<span class="ident">pt</span>, <span class="ident">pt2</span>), <span class="ident">lane</span>.<span class="ident">width</span>).<span class="ident">make_polygons</span>(<span class="ident">track_width</span>),
);
@ -542,22 +539,22 @@
<span class="kw">while</span> <span class="ident">dist</span> <span class="op">+</span> <span class="ident">buffer</span> <span class="op">&lt;</span><span class="op">=</span> <span class="ident">len</span> {
<span class="kw">let</span> (<span class="ident">pt</span>, <span class="ident">angle</span>) <span class="op">=</span> <span class="ident">lane</span>.<span class="ident">lane_center_pts</span>.<span class="ident">must_dist_along</span>(<span class="ident">dist</span>);
<span class="kw">if</span> <span class="ident">lane</span>.<span class="ident">is_bus</span>() {
<span class="ident">draw</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">g</span>, <span class="string">&quot;system/assets/map/bus_only.svg&quot;</span>)
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">prerender</span>, <span class="string">&quot;system/assets/map/bus_only.svg&quot;</span>)
.<span class="ident">scale</span>(<span class="number">0.06</span>)
.<span class="ident">centered_on</span>(<span class="ident">pt</span>)
.<span class="ident">rotate</span>(<span class="ident">angle</span>.<span class="ident">shortest_rotation_towards</span>(<span class="ident">Angle</span>::<span class="ident">degrees</span>(<span class="op">-</span><span class="number">90.0</span>))),
);
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">lane</span>.<span class="ident">is_biking</span>() {
<span class="ident">draw</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">g</span>, <span class="string">&quot;system/assets/meters/bike.svg&quot;</span>)
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">prerender</span>, <span class="string">&quot;system/assets/meters/bike.svg&quot;</span>)
.<span class="ident">scale</span>(<span class="number">0.06</span>)
.<span class="ident">centered_on</span>(<span class="ident">pt</span>)
.<span class="ident">rotate</span>(<span class="ident">angle</span>.<span class="ident">shortest_rotation_towards</span>(<span class="ident">Angle</span>::<span class="ident">degrees</span>(<span class="op">-</span><span class="number">90.0</span>))),
);
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">lane</span>.<span class="ident">lane_type</span> <span class="op">=</span><span class="op">=</span> <span class="ident">LaneType</span>::<span class="ident">SharedLeftTurn</span> {
<span class="ident">draw</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">g</span>, <span class="string">&quot;system/assets/map/shared_left_turn.svg&quot;</span>)
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">prerender</span>, <span class="string">&quot;system/assets/map/shared_left_turn.svg&quot;</span>)
.<span class="ident">autocrop</span>()
.<span class="ident">scale</span>(<span class="number">0.003</span>)
.<span class="ident">centered_on</span>(<span class="ident">pt</span>)
@ -565,17 +562,14 @@
);
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">lane</span>.<span class="ident">lane_type</span> <span class="op">=</span><span class="op">=</span> <span class="ident">LaneType</span>::<span class="ident">Construction</span> {
<span class="comment">// TODO Still not quite centered right, but close enough</span>
<span class="ident">draw</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(
<span class="ident">g</span>.<span class="ident">prerender</span>,
<span class="string">&quot;system/assets/map/under_construction.svg&quot;</span>,
)
.<span class="ident">scale</span>(<span class="number">0.05</span>)
.<span class="ident">rotate_around_batch_center</span>(
<span class="ident">angle</span>.<span class="ident">shortest_rotation_towards</span>(<span class="ident">Angle</span>::<span class="ident">degrees</span>(<span class="op">-</span><span class="number">90.0</span>)),
)
.<span class="ident">autocrop</span>()
.<span class="ident">centered_on</span>(<span class="ident">pt</span>),
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">prerender</span>, <span class="string">&quot;system/assets/map/under_construction.svg&quot;</span>)
.<span class="ident">scale</span>(<span class="number">0.05</span>)
.<span class="ident">rotate_around_batch_center</span>(
<span class="ident">angle</span>.<span class="ident">shortest_rotation_towards</span>(<span class="ident">Angle</span>::<span class="ident">degrees</span>(<span class="op">-</span><span class="number">90.0</span>)),
)
.<span class="ident">autocrop</span>()
.<span class="ident">centered_on</span>(<span class="ident">pt</span>),
);
}
<span class="ident">dist</span> <span class="op">+</span><span class="op">=</span> <span class="ident">btwn</span>;
@ -583,14 +577,14 @@
}
<span class="kw">if</span> <span class="ident">road</span>.<span class="ident">is_private</span>() {
<span class="ident">draw</span>.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">private_road</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>), <span class="self">self</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>());
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">private_road</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>), <span class="self">self</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>());
}
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">zorder</span> <span class="op">&lt;</span> <span class="number">0</span> {
<span class="ident">draw</span> <span class="op">=</span> <span class="ident">draw</span>.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAlpha</span>(<span class="number">0.5</span>));
<span class="ident">batch</span> <span class="op">=</span> <span class="ident">batch</span>.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAlpha</span>(<span class="number">0.5</span>));
}
<span class="ident">g</span>.<span class="ident">upload</span>(<span class="ident">draw</span>)
<span class="ident">batch</span>
}
}
@ -604,7 +598,7 @@
<span class="comment">// exhaustively see every lane during a single session</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">draw</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">draw_default</span>.<span class="ident">borrow_mut</span>();
<span class="kw">if</span> <span class="ident">draw</span>.<span class="ident">is_none</span>() {
<span class="kw-2">*</span><span class="ident">draw</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="self">self</span>.<span class="ident">render</span>(<span class="ident">g</span>, <span class="ident">app</span>));
<span class="kw-2">*</span><span class="ident">draw</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">g</span>.<span class="ident">upload</span>(<span class="self">self</span>.<span class="ident">render</span>(<span class="ident">g</span>, <span class="ident">app</span>)));
}
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>());
}

View File

@ -383,6 +383,60 @@
<span id="380">380</span>
<span id="381">381</span>
<span id="382">382</span>
<span id="383">383</span>
<span id="384">384</span>
<span id="385">385</span>
<span id="386">386</span>
<span id="387">387</span>
<span id="388">388</span>
<span id="389">389</span>
<span id="390">390</span>
<span id="391">391</span>
<span id="392">392</span>
<span id="393">393</span>
<span id="394">394</span>
<span id="395">395</span>
<span id="396">396</span>
<span id="397">397</span>
<span id="398">398</span>
<span id="399">399</span>
<span id="400">400</span>
<span id="401">401</span>
<span id="402">402</span>
<span id="403">403</span>
<span id="404">404</span>
<span id="405">405</span>
<span id="406">406</span>
<span id="407">407</span>
<span id="408">408</span>
<span id="409">409</span>
<span id="410">410</span>
<span id="411">411</span>
<span id="412">412</span>
<span id="413">413</span>
<span id="414">414</span>
<span id="415">415</span>
<span id="416">416</span>
<span id="417">417</span>
<span id="418">418</span>
<span id="419">419</span>
<span id="420">420</span>
<span id="421">421</span>
<span id="422">422</span>
<span id="423">423</span>
<span id="424">424</span>
<span id="425">425</span>
<span id="426">426</span>
<span id="427">427</span>
<span id="428">428</span>
<span id="429">429</span>
<span id="430">430</span>
<span id="431">431</span>
<span id="432">432</span>
<span id="433">433</span>
<span id="434">434</span>
<span id="435">435</span>
<span id="436">436</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
@ -765,6 +819,60 @@
<span class="ident">borrows</span>
}
<span class="doccomment">/// Build a single gigantic `GeomBatch` to render the entire map when zoomed in. Likely messes</span>
<span class="doccomment">/// up Z-ordering.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">zoomed_batch</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">dyn</span> <span class="ident">AppLike</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="comment">// TODO This repeats code. There are other approaches, like making EventCtx intercept</span>
<span class="comment">// &quot;uploads&quot; and instead save the batches.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>();
<span class="kw">let</span> <span class="ident">cs</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">cs</span>();
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">cs</span>.<span class="ident">map_background</span>.<span class="ident">clone</span>(),
<span class="ident">map</span>.<span class="ident">get_boundary_polygon</span>().<span class="ident">clone</span>(),
);
<span class="kw">for</span> <span class="ident">a</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_areas</span>() {
<span class="ident">DrawArea</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">a</span>, <span class="ident">cs</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">batch</span>);
}
<span class="kw">for</span> <span class="ident">pl</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_parking_lots</span>() {
<span class="ident">batch</span>.<span class="ident">append</span>(<span class="ident">DrawParkingLot</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">pl</span>, <span class="ident">cs</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>()).<span class="ident">render</span>(<span class="ident">app</span>));
}
<span class="kw">for</span> <span class="ident">l</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_lanes</span>() {
<span class="ident">batch</span>.<span class="ident">append</span>(<span class="ident">DrawLane</span>::<span class="ident">new</span>(<span class="ident">l</span>, <span class="ident">map</span>).<span class="ident">render</span>(<span class="ident">ctx</span>, <span class="ident">app</span>));
}
<span class="comment">// TODO Road centers</span>
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_intersections</span>() {
<span class="ident">batch</span>.<span class="ident">append</span>(<span class="ident">DrawIntersection</span>::<span class="ident">new</span>(<span class="ident">i</span>, <span class="ident">map</span>).<span class="ident">render</span>(<span class="ident">ctx</span>, <span class="ident">app</span>));
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">bldgs_batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">paths_batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">outlines_batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_buildings</span>() {
<span class="ident">DrawBuilding</span>::<span class="ident">new</span>(
<span class="ident">ctx</span>,
<span class="ident">b</span>,
<span class="ident">map</span>,
<span class="ident">cs</span>,
<span class="ident">app</span>.<span class="ident">opts</span>(),
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">bldgs_batch</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">paths_batch</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">outlines_batch</span>,
);
}
<span class="ident">batch</span>.<span class="ident">append</span>(<span class="ident">paths_batch</span>);
<span class="ident">batch</span>.<span class="ident">append</span>(<span class="ident">bldgs_batch</span>);
<span class="ident">batch</span>.<span class="ident">append</span>(<span class="ident">outlines_batch</span>);
<span class="ident">batch</span>
}
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_gui";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -123,6 +123,10 @@
<span id="120">120</span>
<span id="121">121</span>
<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>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">cell</span>::<span class="ident">RefCell</span>;
@ -167,6 +171,57 @@
<span class="ident">draw</span>: <span class="ident">RefCell</span>::<span class="ident">new</span>(<span class="prelude-val">None</span>),
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">render</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">dyn</span> <span class="ident">AppLike</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="kw">let</span> <span class="ident">lot</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>().<span class="ident">get_pl</span>(<span class="self">self</span>.<span class="ident">id</span>);
<span class="comment">// Trim the front path line away from the sidewalk&#39;s center line, so that it doesn&#39;t</span>
<span class="comment">// overlap. For now, this cleanup is visual; it doesn&#39;t belong in the map_model layer.</span>
<span class="kw">let</span> <span class="ident">orig_line</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">lot</span>.<span class="ident">sidewalk_line</span>;
<span class="kw">let</span> <span class="ident">front_path_line</span> <span class="op">=</span> <span class="ident">orig_line</span>
.<span class="ident">slice</span>(
<span class="ident">Distance</span>::<span class="ident">ZERO</span>,
<span class="ident">orig_line</span>.<span class="ident">length</span>() <span class="op">-</span> <span class="ident">app</span>.<span class="ident">map</span>().<span class="ident">get_l</span>(<span class="ident">lot</span>.<span class="ident">sidewalk_pos</span>.<span class="ident">lane</span>()).<span class="ident">width</span> <span class="op">/</span> <span class="number">2.0</span>,
)
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="ident">orig_line</span>.<span class="ident">clone</span>());
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="comment">// TODO This isn&#39;t getting clipped to the parking lot boundary properly, so just stick</span>
<span class="comment">// this on the lowest order for now.</span>
<span class="kw">let</span> <span class="ident">rank</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>().<span class="ident">get_parent</span>(<span class="ident">lot</span>.<span class="ident">sidewalk_pos</span>.<span class="ident">lane</span>()).<span class="ident">get_rank</span>();
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">zoomed_road_surface</span>(<span class="ident">LaneType</span>::<span class="ident">Sidewalk</span>, <span class="ident">rank</span>),
<span class="ident">front_path_line</span>.<span class="ident">make_polygons</span>(<span class="ident">NORMAL_LANE_THICKNESS</span>),
);
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">parking_lot</span>, <span class="ident">lot</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>());
<span class="kw">for</span> <span class="ident">aisle</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">lot</span>.<span class="ident">aisles</span> {
<span class="kw">let</span> <span class="ident">aisle_thickness</span> <span class="op">=</span> <span class="ident">NORMAL_LANE_THICKNESS</span> <span class="op">/</span> <span class="number">2.0</span>;
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>()
.<span class="ident">zoomed_road_surface</span>(<span class="ident">LaneType</span>::<span class="ident">Driving</span>, <span class="ident">osm</span>::<span class="ident">RoadRank</span>::<span class="ident">Local</span>),
<span class="ident">PolyLine</span>::<span class="ident">unchecked_new</span>(<span class="ident">aisle</span>.<span class="ident">clone</span>()).<span class="ident">make_polygons</span>(<span class="ident">aisle_thickness</span>),
);
}
<span class="kw">let</span> <span class="ident">width</span> <span class="op">=</span> <span class="ident">NORMAL_LANE_THICKNESS</span>;
<span class="kw">let</span> <span class="ident">height</span> <span class="op">=</span> <span class="ident">PARKING_LOT_SPOT_LENGTH</span>;
<span class="kw">for</span> (<span class="ident">pt</span>, <span class="ident">angle</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">lot</span>.<span class="ident">spots</span> {
<span class="kw">let</span> <span class="ident">left</span> <span class="op">=</span> <span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="ident">width</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>));
<span class="kw">let</span> <span class="ident">right</span> <span class="op">=</span> <span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="ident">width</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="op">-</span><span class="number">90.0</span>));
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">general_road_marking</span>(<span class="ident">rank</span>),
<span class="ident">PolyLine</span>::<span class="ident">must_new</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">left</span>.<span class="ident">project_away</span>(<span class="ident">height</span>, <span class="kw-2">*</span><span class="ident">angle</span>),
<span class="ident">left</span>,
<span class="ident">right</span>,
<span class="ident">right</span>.<span class="ident">project_away</span>(<span class="ident">height</span>, <span class="kw-2">*</span><span class="ident">angle</span>),
])
.<span class="ident">make_polygons</span>(<span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">0.25</span>)),
);
}
<span class="ident">batch</span>
}
}
<span class="kw">impl</span> <span class="ident">Renderable</span> <span class="kw">for</span> <span class="ident">DrawParkingLot</span> {
@ -177,54 +232,7 @@
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">dyn</span> <span class="ident">AppLike</span>, <span class="kw">_</span>: <span class="kw-2">&amp;</span><span class="ident">DrawOptions</span>) {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">draw</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">draw</span>.<span class="ident">borrow_mut</span>();
<span class="kw">if</span> <span class="ident">draw</span>.<span class="ident">is_none</span>() {
<span class="kw">let</span> <span class="ident">lot</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>().<span class="ident">get_pl</span>(<span class="self">self</span>.<span class="ident">id</span>);
<span class="comment">// Trim the front path line away from the sidewalk&#39;s center line, so that it doesn&#39;t</span>
<span class="comment">// overlap. For now, this cleanup is visual; it doesn&#39;t belong in the map_model layer.</span>
<span class="kw">let</span> <span class="ident">orig_line</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">lot</span>.<span class="ident">sidewalk_line</span>;
<span class="kw">let</span> <span class="ident">front_path_line</span> <span class="op">=</span> <span class="ident">orig_line</span>
.<span class="ident">slice</span>(
<span class="ident">Distance</span>::<span class="ident">ZERO</span>,
<span class="ident">orig_line</span>.<span class="ident">length</span>() <span class="op">-</span> <span class="ident">app</span>.<span class="ident">map</span>().<span class="ident">get_l</span>(<span class="ident">lot</span>.<span class="ident">sidewalk_pos</span>.<span class="ident">lane</span>()).<span class="ident">width</span> <span class="op">/</span> <span class="number">2.0</span>,
)
.<span class="ident">unwrap_or_else</span>(<span class="op">|</span><span class="op">|</span> <span class="ident">orig_line</span>.<span class="ident">clone</span>());
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="comment">// TODO This isn&#39;t getting clipped to the parking lot boundary properly, so just stick</span>
<span class="comment">// this on the lowest order for now.</span>
<span class="kw">let</span> <span class="ident">rank</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>().<span class="ident">get_parent</span>(<span class="ident">lot</span>.<span class="ident">sidewalk_pos</span>.<span class="ident">lane</span>()).<span class="ident">get_rank</span>();
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">zoomed_road_surface</span>(<span class="ident">LaneType</span>::<span class="ident">Sidewalk</span>, <span class="ident">rank</span>),
<span class="ident">front_path_line</span>.<span class="ident">make_polygons</span>(<span class="ident">NORMAL_LANE_THICKNESS</span>),
);
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">parking_lot</span>, <span class="ident">lot</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>());
<span class="kw">for</span> <span class="ident">aisle</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">lot</span>.<span class="ident">aisles</span> {
<span class="kw">let</span> <span class="ident">aisle_thickness</span> <span class="op">=</span> <span class="ident">NORMAL_LANE_THICKNESS</span> <span class="op">/</span> <span class="number">2.0</span>;
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>()
.<span class="ident">zoomed_road_surface</span>(<span class="ident">LaneType</span>::<span class="ident">Driving</span>, <span class="ident">osm</span>::<span class="ident">RoadRank</span>::<span class="ident">Local</span>),
<span class="ident">PolyLine</span>::<span class="ident">unchecked_new</span>(<span class="ident">aisle</span>.<span class="ident">clone</span>()).<span class="ident">make_polygons</span>(<span class="ident">aisle_thickness</span>),
);
}
<span class="kw">let</span> <span class="ident">width</span> <span class="op">=</span> <span class="ident">NORMAL_LANE_THICKNESS</span>;
<span class="kw">let</span> <span class="ident">height</span> <span class="op">=</span> <span class="ident">PARKING_LOT_SPOT_LENGTH</span>;
<span class="kw">for</span> (<span class="ident">pt</span>, <span class="ident">angle</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">lot</span>.<span class="ident">spots</span> {
<span class="kw">let</span> <span class="ident">left</span> <span class="op">=</span> <span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="ident">width</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>));
<span class="kw">let</span> <span class="ident">right</span> <span class="op">=</span> <span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="ident">width</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="op">-</span><span class="number">90.0</span>));
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">app</span>.<span class="ident">cs</span>().<span class="ident">general_road_marking</span>(<span class="ident">rank</span>),
<span class="ident">PolyLine</span>::<span class="ident">must_new</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">left</span>.<span class="ident">project_away</span>(<span class="ident">height</span>, <span class="kw-2">*</span><span class="ident">angle</span>),
<span class="ident">left</span>,
<span class="ident">right</span>,
<span class="ident">right</span>.<span class="ident">project_away</span>(<span class="ident">height</span>, <span class="kw-2">*</span><span class="ident">angle</span>),
])
.<span class="ident">make_polygons</span>(<span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">0.25</span>)),
);
}
<span class="kw-2">*</span><span class="ident">draw</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">g</span>.<span class="ident">upload</span>(<span class="ident">batch</span>));
<span class="kw-2">*</span><span class="ident">draw</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">g</span>.<span class="ident">upload</span>(<span class="self">self</span>.<span class="ident">render</span>(<span class="ident">app</span>)));
}
<span class="ident">g</span>.<span class="ident">redraw</span>(<span class="ident">draw</span>.<span class="ident">as_ref</span>().<span class="ident">unwrap</span>());
}

View File

@ -268,8 +268,31 @@
<span id="265">265</span>
<span id="266">266</span>
<span id="267">267</span>
<span id="268">268</span>
<span id="269">269</span>
<span id="270">270</span>
<span id="271">271</span>
<span id="272">272</span>
<span id="273">273</span>
<span id="274">274</span>
<span id="275">275</span>
<span id="276">276</span>
<span id="277">277</span>
<span id="278">278</span>
<span id="279">279</span>
<span id="280">280</span>
<span id="281">281</span>
<span id="282">282</span>
<span id="283">283</span>
<span id="284">284</span>
<span id="285">285</span>
<span id="286">286</span>
<span id="287">287</span>
<span id="288">288</span>
<span id="289">289</span>
<span id="290">290</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>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Angle</span>, <span class="ident">Bounds</span>, <span class="ident">GPSBounds</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">widgets</span>::<span class="ident">button</span>::<span class="ident">BtnBuilder</span>;
<span class="kw">use</span> <span class="kw">crate</span>::{
@ -489,6 +512,29 @@
}
<span class="self">self</span>
}
<span class="doccomment">/// Exports the batch to a list of GeoJSON features, labeling each colored polygon. Z-values,</span>
<span class="doccomment">/// alpha values from the color, and non-RGB fill patterns are lost. If the polygon isn&#39;t a</span>
<span class="doccomment">/// ring, it&#39;s skipped. The world-space coordinates are optionally translated back to GPS.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">to_geojson</span>(<span class="self">self</span>, <span class="ident">gps_bounds</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">GPSBounds</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">geojson</span>::<span class="ident">Feature</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">features</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> (<span class="ident">fill</span>, <span class="ident">polygon</span>, <span class="kw">_</span>) <span class="kw">in</span> <span class="self">self</span>.<span class="ident">list</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="ident">Fill</span>::<span class="ident">Color</span>(<span class="ident">color</span>) <span class="op">=</span> <span class="ident">fill</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">properties</span> <span class="op">=</span> <span class="ident">serde_json</span>::<span class="ident">Map</span>::<span class="ident">new</span>();
<span class="ident">properties</span>.<span class="ident">insert</span>(<span class="string">&quot;color&quot;</span>.<span class="ident">to_string</span>(), <span class="ident">color</span>.<span class="ident">to_hex</span>().<span class="ident">into</span>());
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>(<span class="ident">ring</span>) <span class="op">=</span> <span class="ident">Ring</span>::<span class="ident">new</span>(<span class="ident">polygon</span>.<span class="ident">into_points</span>()) {
<span class="ident">features</span>.<span class="ident">push</span>(<span class="ident">geojson</span>::<span class="ident">Feature</span> {
<span class="ident">bbox</span>: <span class="prelude-val">None</span>,
<span class="ident">geometry</span>: <span class="prelude-val">Some</span>(<span class="ident">ring</span>.<span class="ident">to_geojson</span>(<span class="ident">gps_bounds</span>)),
<span class="ident">id</span>: <span class="prelude-val">None</span>,
<span class="ident">properties</span>: <span class="prelude-val">Some</span>(<span class="ident">properties</span>),
<span class="ident">foreign_members</span>: <span class="prelude-val">None</span>,
});
}
}
}
<span class="ident">features</span>
}
}
<span class="kw">impl</span><span class="op">&lt;</span><span class="ident">F</span>: <span class="ident">Into</span><span class="op">&lt;</span><span class="ident">Fill</span><span class="op">&gt;</span><span class="op">&gt;</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">F</span>, <span class="ident">Polygon</span>)<span class="op">&gt;</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">GeomBatch</span> {

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `RewriteColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, RewriteColor"><title>widgetry::RewriteColor - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Enum RewriteColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.apply">apply</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "RewriteColor", ty: "enum", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/geom.rs.html#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 {
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/geom.rs.html#257-269" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="index.html">widgetry</a>::<wbr><a class="enum" href="">RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum RewriteColor {
NoOp,
Change(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>,&nbsp;<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
ChangeAll(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
@ -16,7 +16,7 @@
be a solid block of color.</p>
</div><div id="variant.ChangeAlpha" class="variant small-section-header"><a href="#variant.ChangeAlpha" class="anchor field"></a><code>ChangeAlpha(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</code></div><div class="docblock"><p>Change the alpha value of all colors to this value.</p>
</div><div id="variant.MakeGrayscale" class="variant small-section-header"><a href="#variant.MakeGrayscale" class="anchor field"></a><code>MakeGrayscale</code></div><div class="docblock"><p>Convert all colors to greyscale.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#248-267" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.apply" class="method"><code>fn <a href="#method.apply" class="fnname">apply</a>(&amp;self, c: <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -&gt; <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#249-266" title="goto source code">[src]</a></h4></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#271-290" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.apply" class="method"><code>fn <a href="#method.apply" class="fnname">apply</a>(&amp;self, c: <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -&gt; <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#272-289" title="goto source code">[src]</a></h4></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `RewriteColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, RewriteColor"><title>widgetry::geom::RewriteColor - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Enum RewriteColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Change">Change</a><a href="#variant.ChangeAll">ChangeAll</a><a href="#variant.ChangeAlpha">ChangeAlpha</a><a href="#variant.MakeGrayscale">MakeGrayscale</a><a href="#variant.NoOp">NoOp</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.apply">apply</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "RewriteColor", ty: "enum", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom.rs.html#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 {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom.rs.html#257-269" title="goto source code">[src]</a></span><span class="in-band">Enum <a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a>::<wbr><a class="enum" href="">RewriteColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum">pub enum RewriteColor {
NoOp,
Change(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>,&nbsp;<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
ChangeAll(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
@ -16,7 +16,7 @@
be a solid block of color.</p>
</div><div id="variant.ChangeAlpha" class="variant small-section-header"><a href="#variant.ChangeAlpha" class="anchor field"></a><code>ChangeAlpha(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>)</code></div><div class="docblock"><p>Change the alpha value of all colors to this value.</p>
</div><div id="variant.MakeGrayscale" class="variant small-section-header"><a href="#variant.MakeGrayscale" class="anchor field"></a><code>MakeGrayscale</code></div><div class="docblock"><p>Convert all colors to greyscale.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#248-267" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.apply" class="method"><code>fn <a href="#method.apply" class="fnname">apply</a>(&amp;self, c: <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -&gt; <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#249-266" title="goto source code">[src]</a></h4></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#271-290" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.apply" class="method"><code>fn <a href="#method.apply" class="fnname">apply</a>(&amp;self, c: <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>) -&gt; <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#272-289" title="goto source code">[src]</a></h4></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../widgetry/enum.RewriteColor.html" title="enum widgetry::RewriteColor">RewriteColor</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-Downcast" class="impl"><code class="in-band">impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href="#impl-Downcast" class="anchor"></a></h3><div class="impl-items"><h4 id="method.into_any" class="method hidden"><code>pub fn <a href="#method.into_any" class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `geom` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, geom"><title>widgetry::geom - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module geom</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class="location"><a href="../index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "geom", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom.rs.html#1-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>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom.rs.html#1-290" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">widgetry</a>::<wbr><a class="mod" href="">geom</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.GeomBatch.html" title="widgetry::geom::GeomBatch struct">GeomBatch</a></td><td class="docblock-short"><p>A mutable builder for a group of colored polygons.</p>
</td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
<table><tr class="module-item"><td><a class="enum" href="enum.RewriteColor.html" title="widgetry::geom::RewriteColor enum">RewriteColor</a></td><td class="docblock-short"><p>A way to transform all colors in a GeomBatch.</p>

View File

@ -1,12 +1,12 @@
<!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 id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.from_svg_contents">from_svg_contents</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_btn">to_btn</a><a href="#method.to_btn_custom">to_btn_custom</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.unshift">unshift</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E">From&lt;Vec&lt;(F, Polygon)&gt;&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "GeomBatch", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.from_svg_contents">from_svg_contents</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_btn">to_btn</a><a href="#method.to_btn_custom">to_btn_custom</a><a href="#method.to_geojson">to_geojson</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.unshift">unshift</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E">From&lt;Vec&lt;(F, Polygon)&gt;&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "GeomBatch", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/widgetry/geom.rs.html#10-15" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">widgetry</a>::<wbr><a href="index.html">geom</a>::<wbr><a class="struct" href="">GeomBatch</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GeomBatch {
pub(crate) list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;,
pub autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
}</pre></div><div class="docblock"><p>A mutable builder for a group of colored polygons.</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#17-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#19-24" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates an empty batch.</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#17-244" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#19-24" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates an empty batch.</p>
</div><h4 id="method.push" class="method"><code>pub fn <a href="#method.push" class="fnname">push</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../../src/widgetry/geom.rs.html#27-29" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon, painted according to <code>Fill</code></p>
</div><h4 id="method.push_with_z" class="method"><code>pub fn <a href="#method.push_with_z" class="fnname">push_with_z</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class="srclink" href="../../src/widgetry/geom.rs.html#34-38" title="goto source code">[src]</a></h4><div class="docblock"><p>Offset z value to render above/below other polygons.
z must be in (-1, 0] to ensure we don't traverse layers of the UI - to make
@ -36,9 +36,12 @@ many times later.</p>
</div><h4 id="method.scale" class="method"><code>pub fn <a href="#method.scale" class="fnname">scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#198-208" title="goto source code">[src]</a></h4><div class="docblock"><p>Scales the batch by some factor.</p>
</div><h4 id="method.set_z_offset" class="method"><code>pub fn <a href="#method.set_z_offset" class="fnname">set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#212-220" title="goto source code">[src]</a></h4><div class="docblock"><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
rendering on top.</p>
</div><h4 id="method.to_geojson" class="method"><code>pub fn <a href="#method.to_geojson" class="fnname">to_geojson</a>(self, gps_bounds: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Feature&gt;</code><a class="srclink" href="../../src/widgetry/geom.rs.html#225-243" title="goto source code">[src]</a></h4><div class="docblock"><p>Exports the batch to a list of GeoJSON features, labeling each colored polygon. Z-values,
alpha values from the color, and non-RGB fill patterns are lost. If the polygon isn't a
ring, it's skipped. The world-space coordinates are optionally translated back to GPS.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#9" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#9" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E" class="impl"><code class="in-band">impl&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt; for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#223-231" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#225-230" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a batch of filled polygons.</p>
</div></div><h3 id="impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E" class="impl"><code class="in-band">impl&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt; for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E" class="anchor"></a><a class="srclink" href="../../src/widgetry/geom.rs.html#246-254" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../../src/widgetry/geom.rs.html#248-253" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a batch of filled polygons.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

View File

@ -1,12 +1,12 @@
<!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 id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.from_svg_contents">from_svg_contents</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_btn">to_btn</a><a href="#method.to_btn_custom">to_btn_custom</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.unshift">unshift</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E">From&lt;Vec&lt;(F, Polygon)&gt;&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "GeomBatch", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct GeomBatch</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.autocrop_dims">autocrop_dims</a><a href="#structfield.list">list</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.append">append</a><a href="#method.autocrop">autocrop</a><a href="#method.batch">batch</a><a href="#method.centered_on">centered_on</a><a href="#method.color">color</a><a href="#method.consume">consume</a><a href="#method.draw">draw</a><a href="#method.extend">extend</a><a href="#method.from_svg_contents">from_svg_contents</a><a href="#method.get_bounds">get_bounds</a><a href="#method.get_dims">get_dims</a><a href="#method.is_empty">is_empty</a><a href="#method.load_svg">load_svg</a><a href="#method.new">new</a><a href="#method.push">push</a><a href="#method.push_with_z">push_with_z</a><a href="#method.rotate">rotate</a><a href="#method.rotate_around_batch_center">rotate_around_batch_center</a><a href="#method.scale">scale</a><a href="#method.set_z_offset">set_z_offset</a><a href="#method.to_btn">to_btn</a><a href="#method.to_btn_custom">to_btn_custom</a><a href="#method.to_geojson">to_geojson</a><a href="#method.translate">translate</a><a href="#method.unioned_polygon">unioned_polygon</a><a href="#method.unshift">unshift</a><a href="#method.upload">upload</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E">From&lt;Vec&lt;(F, Polygon)&gt;&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">widgetry</a></p><script>window.sidebarCurrent = {name: "GeomBatch", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/widgetry/geom.rs.html#10-15" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">widgetry</a>::<wbr><a class="struct" href="">GeomBatch</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GeomBatch {
pub(crate) list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;,
pub autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
}</pre></div><div class="docblock"><p>A mutable builder for a group of colored polygons.</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#17-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#19-24" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates an empty batch.</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.list" class="structfield small-section-header"><a href="#structfield.list" class="anchor field"></a><code>list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</code></span><span id="structfield.autocrop_dims" class="structfield small-section-header"><a href="#structfield.autocrop_dims" class="anchor field"></a><code>autocrop_dims: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#17-244" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#19-24" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates an empty batch.</p>
</div><h4 id="method.push" class="method"><code>pub fn <a href="#method.push" class="fnname">push</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>)</code><a class="srclink" href="../src/widgetry/geom.rs.html#27-29" title="goto source code">[src]</a></h4><div class="docblock"><p>Adds a single polygon, painted according to <code>Fill</code></p>
</div><h4 id="method.push_with_z" class="method"><code>pub fn <a href="#method.push_with_z" class="fnname">push_with_z</a>&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt;(&amp;mut self, fill: F, p: <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>, z_offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>)</code><a class="srclink" href="../src/widgetry/geom.rs.html#34-38" title="goto source code">[src]</a></h4><div class="docblock"><p>Offset z value to render above/below other polygons.
z must be in (-1, 0] to ensure we don't traverse layers of the UI - to make
@ -36,9 +36,12 @@ many times later.</p>
</div><h4 id="method.scale" class="method"><code>pub fn <a href="#method.scale" class="fnname">scale</a>(self, factor: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#198-208" title="goto source code">[src]</a></h4><div class="docblock"><p>Scales the batch by some factor.</p>
</div><h4 id="method.set_z_offset" class="method"><code>pub fn <a href="#method.set_z_offset" class="fnname">set_z_offset</a>(self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#212-220" title="goto source code">[src]</a></h4><div class="docblock"><p>Overrides the Z-ordering offset for the batch. Must be in (-1, 0], with values closer to -1
rendering on top.</p>
</div><h4 id="method.to_geojson" class="method"><code>pub fn <a href="#method.to_geojson" class="fnname">to_geojson</a>(self, gps_bounds: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../geom/bounds/struct.GPSBounds.html" title="struct geom::bounds::GPSBounds">GPSBounds</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Feature&gt;</code><a class="srclink" href="../src/widgetry/geom.rs.html#225-243" title="goto source code">[src]</a></h4><div class="docblock"><p>Exports the batch to a list of GeoJSON features, labeling each colored polygon. Z-values,
alpha values from the color, and non-RGB fill patterns are lost. If the polygon isn't a
ring, it's skipped. The world-space coordinates are optionally translated back to GPS.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#9" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#9" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E" class="impl"><code class="in-band">impl&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt; for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#223-231" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#225-230" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a batch of filled polygons.</p>
</div></div><h3 id="impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E" class="impl"><code class="in-band">impl&lt;F:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../widgetry/enum.Fill.html" title="enum widgetry::Fill">Fill</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;&gt; for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-From%3CVec%3C(F%2C%20Polygon)%3E%3E" class="anchor"></a><a class="srclink" href="../src/widgetry/geom.rs.html#246-254" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method"><code>fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(list: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>F, <a class="struct" href="../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;) -&gt; <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a class="srclink" href="../src/widgetry/geom.rs.html#248-253" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a batch of filled polygons.</p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../widgetry/struct.GeomBatch.html" title="struct widgetry::GeomBatch">GeomBatch</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>