This commit is contained in:
dabreegster 2020-09-18 01:58:26 +00:00
parent b8ad23ed28
commit 0dc9ad66c4
56 changed files with 829 additions and 221 deletions

View File

@ -210,6 +210,7 @@ this as a Mac .app, to make this process simpler</li>
License)</li>
<li>Bungee fonts (<a href="https://fonts.google.com/specimen/Bungee">https://fonts.google.com/specimen/Bungee</a>, Open Font License)</li>
<li>Material Design icons (<a href="https://material.io/resources/icons">https://material.io/resources/icons</a>, Apache license)</li>
<li>Some Graphics textures (<a href="https://www.kenney.nl/">https://www.kenney.nl/</a>, CC0 1.0 Universal)</li>
</ul>
</main>

View File

@ -215,6 +215,7 @@ this as a Mac .app, to make this process simpler</li>
License)</li>
<li>Bungee fonts (<a href="https://fonts.google.com/specimen/Bungee">https://fonts.google.com/specimen/Bungee</a>, Open Font License)</li>
<li>Material Design icons (<a href="https://material.io/resources/icons">https://material.io/resources/icons</a>, Apache license)</li>
<li>Some Graphics textures (<a href="https://www.kenney.nl/">https://www.kenney.nl/</a>, CC0 1.0 Universal)</li>
</ul>
<h1><a class="header" href="#help-map-out-on-street-parking" id="help-map-out-on-street-parking">Help map out on-street parking</a></h1>
<p><img src="howto/parking_mapper.gif" alt="parking_mapper" /></p>

View File

@ -1,2 +1,2 @@
<!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="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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-3c7487281029702d/out/built.rs.html#49' 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, 18 Sep 2020 00:38:46 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
<!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="../../../dark.css"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="shortcut icon" href="../../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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-3c7487281029702d/out/built.rs.html#49' 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, 18 Sep 2020 01:56:13 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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

@ -111,7 +111,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.46.0 (04488afe3 2020-08-24)&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, 18 Sep 2020 00:38:46 +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, 18 Sep 2020 01:56:13 +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

@ -347,6 +347,9 @@
<span id="347">347</span>
<span id="348">348</span>
<span id="349">349</span>
<span id="350">350</span>
<span id="351">351</span>
<span id="352">352</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">drawing</span>::<span class="ident">Uniforms</span>;
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">Canvas</span>, <span class="ident">Color</span>, <span class="ident">GeomBatch</span>, <span class="ident">ScreenDims</span>, <span class="ident">ScreenRectangle</span>};
@ -563,14 +566,14 @@
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">actually_upload</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">permanent</span>: <span class="ident">bool</span>, <span class="ident">batch</span>: <span class="ident">GeomBatch</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Drawable</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">vertices</span>: <span class="ident">Vec</span><span class="op">&lt;</span>[<span class="ident">f32</span>; <span class="number">6</span>]<span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">vertices</span>: <span class="ident">Vec</span><span class="op">&lt;</span>[<span class="ident">f32</span>; <span class="number">7</span>]<span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">indices</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">u32</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> (<span class="ident">color</span>, <span class="ident">poly</span>) <span class="kw">in</span> <span class="ident">batch</span>.<span class="ident">consume</span>() {
<span class="kw">let</span> <span class="ident">idx_offset</span> <span class="op">=</span> <span class="ident">vertices</span>.<span class="ident">len</span>() <span class="kw">as</span> <span class="ident">u32</span>;
<span class="kw">let</span> (<span class="ident">pts</span>, <span class="ident">raw_indices</span>) <span class="op">=</span> <span class="ident">poly</span>.<span class="ident">raw_for_rendering</span>();
<span class="kw">for</span> <span class="ident">pt</span> <span class="kw">in</span> <span class="ident">pts</span> {
<span class="kw">let</span> <span class="ident">style</span> <span class="op">=</span> <span class="ident">color</span>.<span class="ident">style</span>(<span class="kw-2">*</span><span class="ident">pt</span>);
<span class="kw">let</span> <span class="ident">style</span> <span class="op">=</span> <span class="ident">color</span>.<span class="ident">shader_style</span>(<span class="kw-2">*</span><span class="ident">pt</span>);
<span class="ident">vertices</span>.<span class="ident">push</span>([
<span class="ident">pt</span>.<span class="ident">x</span>() <span class="kw">as</span> <span class="ident">f32</span>,
<span class="ident">pt</span>.<span class="ident">y</span>() <span class="kw">as</span> <span class="ident">f32</span>,
@ -578,6 +581,7 @@
<span class="ident">style</span>[<span class="number">1</span>],
<span class="ident">style</span>[<span class="number">2</span>],
<span class="ident">style</span>[<span class="number">3</span>],
<span class="ident">style</span>[<span class="number">4</span>],
]);
}
<span class="kw">for</span> <span class="ident">idx</span> <span class="kw">in</span> <span class="ident">raw_indices</span> {
@ -609,23 +613,25 @@
<span class="ident">glow</span>::<span class="ident">STATIC_DRAW</span>,
);
<span class="comment">// TODO Can we have a single vertex array for everything, since there&#39;s an uber shader?</span>
<span class="kw">let</span> <span class="ident">stride</span> <span class="op">=</span> <span class="number">6</span> <span class="op">*</span> <span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">size_of</span>::<span class="op">&lt;</span><span class="ident">f32</span><span class="op">&gt;</span>() <span class="kw">as</span> <span class="ident">i32</span>;
<span class="comment">// position is vec2</span>
<span class="self">self</span>.<span class="ident">gl</span>.<span class="ident">enable_vertex_attrib_array</span>(<span class="number">0</span>);
<span class="self">self</span>.<span class="ident">gl</span>
.<span class="ident">vertex_attrib_pointer_f32</span>(<span class="number">0</span>, <span class="number">2</span>, <span class="ident">glow</span>::<span class="ident">FLOAT</span>, <span class="bool-val">false</span>, <span class="ident">stride</span>, <span class="number">0</span>);
<span class="comment">// style is vec4</span>
<span class="self">self</span>.<span class="ident">gl</span>.<span class="ident">enable_vertex_attrib_array</span>(<span class="number">1</span>);
<span class="kw">let</span> <span class="ident">vertex_attributes</span>: [<span class="ident">i32</span>; <span class="number">3</span>] <span class="op">=</span> [
<span class="number">2</span>, <span class="comment">// position is vec2</span>
<span class="number">4</span>, <span class="comment">// color is vec4</span>
<span class="number">1</span>, <span class="comment">// texture_id is float</span>
];
<span class="kw">let</span> <span class="ident">stride</span> <span class="op">=</span> <span class="ident">vertex_attributes</span>.<span class="ident">iter</span>().<span class="ident">sum</span>::<span class="op">&lt;</span><span class="ident">i32</span><span class="op">&gt;</span>() <span class="op">*</span> <span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">size_of</span>::<span class="op">&lt;</span><span class="ident">f32</span><span class="op">&gt;</span>() <span class="kw">as</span> <span class="ident">i32</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">offset</span> <span class="op">=</span> <span class="number">0</span>;
<span class="kw">for</span> (<span class="ident">i</span>, <span class="ident">size</span>) <span class="kw">in</span> <span class="ident">vertex_attributes</span>.<span class="ident">iter</span>().<span class="ident">enumerate</span>() {
<span class="self">self</span>.<span class="ident">gl</span>.<span class="ident">enable_vertex_attrib_array</span>(<span class="ident">i</span> <span class="kw">as</span> <span class="ident">u32</span>);
<span class="self">self</span>.<span class="ident">gl</span>.<span class="ident">vertex_attrib_pointer_f32</span>(
<span class="number">1</span>,
<span class="number">4</span>,
<span class="ident">i</span> <span class="kw">as</span> <span class="ident">u32</span>,
<span class="kw-2">*</span><span class="ident">size</span>,
<span class="ident">glow</span>::<span class="ident">FLOAT</span>,
<span class="bool-val">false</span>,
<span class="ident">stride</span>,
<span class="number">2</span> <span class="op">*</span> <span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">size_of</span>::<span class="op">&lt;</span><span class="ident">f32</span><span class="op">&gt;</span>() <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">offset</span>,
);
<span class="ident">offset</span> <span class="op">+</span><span class="op">=</span> <span class="ident">size</span> <span class="op">*</span> <span class="ident">std</span>::<span class="ident">mem</span>::<span class="ident">size_of</span>::<span class="op">&lt;</span><span class="ident">f32</span><span class="op">&gt;</span>() <span class="kw">as</span> <span class="ident">i32</span>;
}
<span class="comment">// Safety?</span>
<span class="self">self</span>.<span class="ident">gl</span>.<span class="ident">bind_vertex_array</span>(<span class="prelude-val">None</span>);

View File

@ -89,6 +89,207 @@
<span id="89"> 89</span>
<span id="90"> 90</span>
<span id="91"> 91</span>
<span id="92"> 92</span>
<span id="93"> 93</span>
<span id="94"> 94</span>
<span id="95"> 95</span>
<span id="96"> 96</span>
<span id="97"> 97</span>
<span id="98"> 98</span>
<span id="99"> 99</span>
<span id="100">100</span>
<span id="101">101</span>
<span id="102">102</span>
<span id="103">103</span>
<span id="104">104</span>
<span id="105">105</span>
<span id="106">106</span>
<span id="107">107</span>
<span id="108">108</span>
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
<span id="115">115</span>
<span id="116">116</span>
<span id="117">117</span>
<span id="118">118</span>
<span id="119">119</span>
<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>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
<span id="216">216</span>
<span id="217">217</span>
<span id="218">218</span>
<span id="219">219</span>
<span id="220">220</span>
<span id="221">221</span>
<span id="222">222</span>
<span id="223">223</span>
<span id="224">224</span>
<span id="225">225</span>
<span id="226">226</span>
<span id="227">227</span>
<span id="228">228</span>
<span id="229">229</span>
<span id="230">230</span>
<span id="231">231</span>
<span id="232">232</span>
<span id="233">233</span>
<span id="234">234</span>
<span id="235">235</span>
<span id="236">236</span>
<span id="237">237</span>
<span id="238">238</span>
<span id="239">239</span>
<span id="240">240</span>
<span id="241">241</span>
<span id="242">242</span>
<span id="243">243</span>
<span id="244">244</span>
<span id="245">245</span>
<span id="246">246</span>
<span id="247">247</span>
<span id="248">248</span>
<span id="249">249</span>
<span id="250">250</span>
<span id="251">251</span>
<span id="252">252</span>
<span id="253">253</span>
<span id="254">254</span>
<span id="255">255</span>
<span id="256">256</span>
<span id="257">257</span>
<span id="258">258</span>
<span id="259">259</span>
<span id="260">260</span>
<span id="261">261</span>
<span id="262">262</span>
<span id="263">263</span>
<span id="264">264</span>
<span id="265">265</span>
<span id="266">266</span>
<span id="267">267</span>
<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>
<span id="291">291</span>
<span id="292">292</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">backend_glow</span>::<span class="ident">Drawable</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">backend_glow</span>::{<span class="ident">GfxCtxInnards</span>, <span class="ident">PrerenderInnards</span>};
@ -159,6 +360,8 @@
);
}
<span class="ident">load_textures</span>(<span class="kw-2">&amp;</span><span class="ident">gl</span>, <span class="string">&quot;system/assets/textures/spritesheet.png&quot;</span>, <span class="number">64</span>).<span class="ident">unwrap</span>();
(
<span class="ident">PrerenderInnards</span>::<span class="ident">new</span>(<span class="ident">gl</span>, <span class="ident">program</span>, <span class="ident">WindowAdapter</span>(<span class="ident">windowed_context</span>)),
<span class="ident">event_loop</span>,
@ -181,5 +384,204 @@
<span class="self">self</span>.<span class="number">0</span>.<span class="ident">swap_buffers</span>().<span class="ident">unwrap</span>();
}
}
<span class="doccomment">/// Uploads a sprite sheet of textures to the GPU so they can be used by FancyColor::Texture and</span>
<span class="doccomment">/// friends to paint shapes.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// `path` - image file which is a grid of images.</span>
<span class="doccomment">/// `sprite_length` - the width and height of an individual cell in the image grid</span>
<span class="doccomment">///</span>
<span class="doccomment">/// The image file can have any number of sprites, but they must all be the same size.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// Once uploaded, textures are addressed by their id, starting from 1, from left to right, top to</span>
<span class="doccomment">/// bottom, like so:</span>
<span class="doccomment">///</span>
<span class="doccomment">/// ┌─┬─┬─┐</span>
<span class="doccomment">/// │1│2│3│</span>
<span class="doccomment">/// ├─┼─┼─┤</span>
<span class="doccomment">/// │4│5│6│</span>
<span class="doccomment">/// ├─┼─┼─┤</span>
<span class="doccomment">/// │7│8│9│</span>
<span class="doccomment">/// └─┴─┴─┘</span>
<span class="doccomment">///</span>
<span class="doccomment">/// Texture(0) is reserved for a pure white (no-op) texture.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// Implementation is based on the the description of ArrayTextures from:</span>
<span class="doccomment">/// https://www.khronos.org/opengl/wiki/Array_Texture.</span>
<span class="kw">fn</span> <span class="ident">load_textures</span>(
<span class="ident">gl</span>: <span class="kw-2">&amp;</span><span class="ident">glow</span>::<span class="ident">Context</span>,
<span class="ident">filename</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>,
<span class="ident">sprite_length</span>: <span class="ident">u32</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Box</span><span class="op">&lt;</span><span class="kw">dyn</span> <span class="ident">std</span>::<span class="ident">error</span>::<span class="ident">Error</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">abstutil</span>::<span class="ident">path</span>(<span class="ident">filename</span>);
<span class="kw">let</span> <span class="ident">image_bytes</span> <span class="op">=</span> <span class="ident">abstutil</span>::<span class="ident">slurp_file</span>(<span class="kw-2">&amp;</span><span class="ident">path</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">dynamic_img</span> <span class="op">=</span> <span class="ident">image</span>::<span class="ident">load_from_memory</span>(<span class="kw-2">&amp;</span><span class="ident">image_bytes</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">img</span> <span class="op">=</span> <span class="kw">if</span> <span class="kw">let</span> <span class="ident">image</span>::<span class="ident">DynamicImage</span>::<span class="ident">ImageRgba8</span>(<span class="ident">img</span>) <span class="op">=</span> <span class="ident">dynamic_img</span> {
<span class="ident">img</span>
} <span class="kw">else</span> {
<span class="macro">todo</span><span class="macro">!</span>(<span class="string">&quot;support other image formats&quot;</span>);
};
<span class="kw">let</span> <span class="ident">format</span> <span class="op">=</span> <span class="ident">glow</span>::<span class="ident">RGBA</span>;
<span class="kw">let</span> <span class="ident">target</span> <span class="op">=</span> <span class="ident">glow</span>::<span class="ident">TEXTURE_2D_ARRAY</span>;
<span class="kw">let</span> <span class="ident">mipmap_level</span> <span class="op">=</span> <span class="number">1</span>;
<span class="kw">let</span> <span class="ident">internal_format</span> <span class="op">=</span> <span class="ident">glow</span>::<span class="ident">RGBA</span>;
<span class="kw">let</span> <span class="ident">texture_id</span> <span class="op">=</span> <span class="kw">unsafe</span> { <span class="ident">gl</span>.<span class="ident">create_texture</span>()<span class="question-mark">?</span> };
<span class="kw">unsafe</span> {
<span class="ident">gl</span>.<span class="ident">bind_texture</span>(<span class="ident">target</span>, <span class="prelude-val">Some</span>(<span class="ident">texture_id</span>));
}
<span class="kw">let</span> (<span class="ident">img_width</span>, <span class="ident">img_height</span>) <span class="op">=</span> <span class="ident">img</span>.<span class="ident">dimensions</span>();
<span class="kw">let</span> <span class="ident">sprite_height</span> <span class="op">=</span> <span class="ident">sprite_length</span>;
<span class="kw">let</span> <span class="ident">sprites_per_row</span> <span class="op">=</span> <span class="ident">img_width</span> <span class="op">/</span> <span class="ident">sprite_length</span>;
<span class="kw">let</span> <span class="ident">sprites_per_column</span> <span class="op">=</span> <span class="ident">img_height</span> <span class="op">/</span> <span class="ident">sprite_length</span>;
<span class="kw">let</span> <span class="ident">sprite_count</span> <span class="op">=</span> <span class="ident">sprites_per_row</span> <span class="op">*</span> <span class="ident">sprites_per_column</span>;
<span class="macro">assert_eq</span><span class="macro">!</span>(
<span class="ident">sprites_per_row</span> <span class="op">*</span> <span class="ident">sprite_length</span>,
<span class="ident">img_width</span>,
<span class="string">&quot;sprites must align exactly&quot;</span>
);
<span class="macro">assert_eq</span><span class="macro">!</span>(
<span class="ident">sprites_per_column</span> <span class="op">*</span> <span class="ident">sprite_height</span>,
<span class="ident">img_height</span>,
<span class="string">&quot;sprites must align exactly&quot;</span>
);
<span class="macro">info</span><span class="macro">!</span>(
<span class="string">&quot;img_size: {}x{}px ({} px), sprite_size: {}x{}px, sprites: {}x{} ({} sprites)&quot;</span>,
<span class="ident">img_width</span>,
<span class="ident">img_height</span>,
<span class="ident">img</span>.<span class="ident">pixels</span>().<span class="ident">len</span>(),
<span class="ident">sprite_length</span>,
<span class="ident">sprite_height</span>,
<span class="ident">sprites_per_row</span>,
<span class="ident">sprites_per_column</span>,
<span class="ident">sprite_count</span>
);
<span class="comment">// In order to avoid branching in our shader logic, all shapes are rendered with a texture.</span>
<span class="comment">// Even &quot;non-textured&quot; styles like FancyColor::RGBA, use a &quot;default&quot; no-op (pure white) texture,</span>
<span class="comment">// which we generate here.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">formatted_pixels</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">image</span>::<span class="ident">Rgba</span><span class="op">&lt;</span><span class="ident">u8</span><span class="op">&gt;</span><span class="op">&gt;</span> <span class="op">=</span>
<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">image</span>::<span class="ident">Rgba</span>([<span class="number">255</span>; <span class="number">4</span>]); (<span class="ident">sprite_length</span> <span class="op">*</span> <span class="ident">sprite_length</span>) <span class="kw">as</span> <span class="ident">usize</span>];
<span class="comment">// OpenGL texture arrays expect each texture&#39;s bytes to be contiguous, but it&#39;s conventional to</span>
<span class="comment">// store textures in a grid within a single spritesheet image, where a row and column traverses</span>
<span class="comment">// multiple sprites.</span>
<span class="comment">//</span>
<span class="comment">// For example, if we had 6 textures, A-F, the input spritesheet bytes would be like:</span>
<span class="comment">// [[AAA, BBB, CCC],</span>
<span class="comment">// [AAA, BBB, CCC]</span>
<span class="comment">// [AAA, BBB, CCC],</span>
<span class="comment">// [DDD, EEE, FFF],</span>
<span class="comment">// [DDD, EEE, FFF],</span>
<span class="comment">// [DDD, EEE, FFF]]</span>
<span class="comment">//</span>
<span class="comment">// Which we need to convert to:</span>
<span class="comment">// [[AAAAAAAAA],</span>
<span class="comment">// [BBBBBBBBB],</span>
<span class="comment">// [CCCCCCCCC],</span>
<span class="comment">// [DDDDDDDDD],</span>
<span class="comment">// [EEEEEEEEE],</span>
<span class="comment">// [FFFFFFFFF]]</span>
<span class="kw">use</span> <span class="ident">image</span>::<span class="ident">GenericImageView</span>;
<span class="kw">for</span> <span class="ident">y</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">sprites_per_column</span> {
<span class="kw">for</span> <span class="ident">x</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">sprites_per_row</span> {
<span class="kw">let</span> <span class="ident">sprite_cell</span> <span class="op">=</span> <span class="ident">img</span>.<span class="ident">view</span>(
<span class="ident">x</span> <span class="op">*</span> <span class="ident">sprite_length</span>,
<span class="ident">y</span> <span class="op">*</span> <span class="ident">sprite_height</span>,
<span class="ident">sprite_length</span>,
<span class="ident">sprite_height</span>,
);
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="ident">sprite_cell</span>.<span class="ident">pixels</span>() {
<span class="ident">formatted_pixels</span>.<span class="ident">push</span>(<span class="ident">p</span>.<span class="number">2</span>.<span class="ident">clone</span>());
}
}
}
<span class="comment">// Allocate the storage.</span>
<span class="kw">unsafe</span> {
<span class="ident">gl</span>.<span class="ident">tex_storage_3d</span>(
<span class="ident">target</span>,
<span class="ident">mipmap_level</span>,
<span class="ident">internal_format</span>,
<span class="ident">sprite_length</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_height</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_count</span> <span class="kw">as</span> <span class="ident">i32</span>,
);
}
<span class="comment">// Upload pixel data.</span>
<span class="comment">//</span>
<span class="comment">// From: https://www.khronos.org/opengl/wiki/Array_Texture#Creation_and_Management</span>
<span class="comment">// &gt; The first 0 refers to the mipmap level (level 0, since there&#39;s only 1)</span>
<span class="comment">// &gt; The following 2 zeroes refers to the x and y offsets in case you only want to</span>
<span class="comment">// &gt; specify a subrectangle.</span>
<span class="comment">// &gt; The final 0 refers to the layer index offset (we start from index 0 and have 2</span>
<span class="comment">// &gt; levels).</span>
<span class="comment">// &gt; Altogether you can specify a 3D box subset of the overall texture, but only one</span>
<span class="comment">// &gt; mip level at a time.</span>
<span class="kw">let</span> <span class="ident">formatted_pixel_bytes</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">u8</span><span class="op">&gt;</span> <span class="op">=</span>
<span class="ident">formatted_pixels</span>.<span class="ident">iter</span>().<span class="ident">flat_map</span>(<span class="op">|</span><span class="ident">p</span><span class="op">|</span> <span class="ident">p</span>.<span class="number">0</span>.<span class="ident">to_vec</span>()).<span class="ident">collect</span>();
<span class="comment">// prepare and generate mipmaps</span>
<span class="kw">unsafe</span> {
<span class="ident">gl</span>.<span class="ident">tex_sub_image_3d</span>(
<span class="ident">target</span>,
<span class="number">0</span>,
<span class="number">0</span>,
<span class="number">0</span>,
<span class="number">0</span>,
<span class="ident">sprite_length</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_height</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_count</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">format</span>,
<span class="ident">glow</span>::<span class="ident">UNSIGNED_BYTE</span>,
<span class="ident">glow</span>::<span class="ident">PixelUnpackData</span>::<span class="ident">Slice</span>(<span class="kw-2">&amp;</span><span class="ident">formatted_pixel_bytes</span>),
);
<span class="ident">gl</span>.<span class="ident">tex_image_3d</span>(
<span class="ident">target</span>,
<span class="number">0</span>,
<span class="ident">format</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_length</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_height</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_count</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="number">0</span>,
<span class="ident">format</span>,
<span class="ident">glow</span>::<span class="ident">UNSIGNED_BYTE</span>,
<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">formatted_pixel_bytes</span>),
);
<span class="ident">gl</span>.<span class="ident">tex_image_3d</span>(
<span class="ident">target</span>,
<span class="number">1</span>,
<span class="ident">format</span> <span class="kw">as</span> <span class="ident">i32</span>,
(<span class="ident">sprite_length</span> <span class="op">/</span> <span class="number">2</span>) <span class="kw">as</span> <span class="ident">i32</span>,
(<span class="ident">sprite_height</span> <span class="op">/</span> <span class="number">2</span>) <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_count</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="number">0</span>,
<span class="ident">format</span>,
<span class="ident">glow</span>::<span class="ident">UNSIGNED_BYTE</span>,
<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">formatted_pixel_bytes</span>),
);
<span class="ident">gl</span>.<span class="ident">tex_image_3d</span>(
<span class="ident">target</span>,
<span class="number">2</span>,
<span class="ident">format</span> <span class="kw">as</span> <span class="ident">i32</span>,
(<span class="ident">sprite_length</span> <span class="op">/</span> <span class="number">4</span>) <span class="kw">as</span> <span class="ident">i32</span>,
(<span class="ident">sprite_height</span> <span class="op">/</span> <span class="number">4</span>) <span class="kw">as</span> <span class="ident">i32</span>,
<span class="ident">sprite_count</span> <span class="kw">as</span> <span class="ident">i32</span>,
<span class="number">0</span>,
<span class="ident">format</span>,
<span class="ident">glow</span>::<span class="ident">UNSIGNED_BYTE</span>,
<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">formatted_pixel_bytes</span>),
);
<span class="ident">gl</span>.<span class="ident">generate_mipmap</span>(<span class="ident">target</span>);
}
<span class="prelude-val">Ok</span>(())
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</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

@ -169,6 +169,48 @@
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Line</span>, <span class="ident">Pt2D</span>};
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
@ -197,6 +239,44 @@
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">FancyColor</span> {
<span class="ident">RGBA</span>(<span class="ident">Color</span>),
<span class="ident">LinearGradient</span>(<span class="ident">LinearGradient</span>),
<span class="doccomment">/// Once uploaded, textures are addressed by their id, starting from 1, from left to right, top</span>
<span class="doccomment">/// to bottom, like so:</span>
<span class="doccomment">///</span>
<span class="doccomment">/// ┌─┬─┬─┐</span>
<span class="doccomment">/// │1│2│3│</span>
<span class="doccomment">/// ├─┼─┼─┤</span>
<span class="doccomment">/// │4│5│6│</span>
<span class="doccomment">/// ├─┼─┼─┤</span>
<span class="doccomment">/// │7│8│9│</span>
<span class="doccomment">/// └─┴─┴─┘</span>
<span class="doccomment">///</span>
<span class="doccomment">/// Texture(0) is reserved for a pure white (no-op) texture.</span>
<span class="ident">Texture</span>(<span class="ident">Texture</span>),
<span class="doccomment">/// The `color` parameter is multiplied by any color baked into the texture, so typically this</span>
<span class="doccomment">/// only makes sense for grayscale textures.</span>
<span class="ident">ColoredTexture</span>(<span class="ident">Color</span>, <span class="ident">Texture</span>),
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">Clone</span>, <span class="ident">PartialEq</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Texture</span>(<span class="ident">u32</span>);
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">impl</span> <span class="ident">Texture</span> {
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">NOOP</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">0</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">GRASS</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">1</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">STILL_WATER</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">2</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUNNING_WATER</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">3</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CONCRETE</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">4</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">SAND</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">5</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">DIRT</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">6</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">SNOW</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">7</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">TREE</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">15</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">PINE_TREE</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">16</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CACTUS</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">17</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">SHRUB</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">18</span>);
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">SNOW_PERSON</span>: <span class="ident">Texture</span> <span class="op">=</span> <span class="ident">Texture</span>(<span class="number">29</span>);
}
<span class="kw">impl</span> <span class="ident">Color</span> {
@ -331,12 +411,16 @@
}
<span class="kw">impl</span> <span class="ident">FancyColor</span> {
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn</span> <span class="ident">style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">pt</span>: <span class="ident">Pt2D</span>) <span class="op">-</span><span class="op">&gt;</span> [<span class="ident">f32</span>; <span class="number">4</span>] {
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn</span> <span class="ident">shader_style</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">pt</span>: <span class="ident">Pt2D</span>) <span class="op">-</span><span class="op">&gt;</span> [<span class="ident">f32</span>; <span class="number">5</span>] {
<span class="kw">match</span> <span class="self">self</span> {
<span class="ident">FancyColor</span>::<span class="ident">RGBA</span>(<span class="ident">c</span>) <span class="op">=</span><span class="op">&gt;</span> [<span class="ident">c</span>.<span class="ident">r</span>, <span class="ident">c</span>.<span class="ident">g</span>, <span class="ident">c</span>.<span class="ident">b</span>, <span class="ident">c</span>.<span class="ident">a</span>],
<span class="ident">FancyColor</span>::<span class="ident">RGBA</span>(<span class="ident">c</span>) <span class="op">=</span><span class="op">&gt;</span> [<span class="ident">c</span>.<span class="ident">r</span>, <span class="ident">c</span>.<span class="ident">g</span>, <span class="ident">c</span>.<span class="ident">b</span>, <span class="ident">c</span>.<span class="ident">a</span>, <span class="number">0.0</span>],
<span class="ident">FancyColor</span>::<span class="ident">LinearGradient</span>(<span class="kw-2">ref</span> <span class="ident">lg</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">c</span> <span class="op">=</span> <span class="ident">lg</span>.<span class="ident">interp</span>(<span class="ident">pt</span>);
[<span class="ident">c</span>.<span class="ident">r</span>, <span class="ident">c</span>.<span class="ident">g</span>, <span class="ident">c</span>.<span class="ident">b</span>, <span class="ident">c</span>.<span class="ident">a</span>]
[<span class="ident">c</span>.<span class="ident">r</span>, <span class="ident">c</span>.<span class="ident">g</span>, <span class="ident">c</span>.<span class="ident">b</span>, <span class="ident">c</span>.<span class="ident">a</span>, <span class="number">0.0</span>]
}
<span class="ident">FancyColor</span>::<span class="ident">Texture</span>(<span class="ident">texture</span>) <span class="op">=</span><span class="op">&gt;</span> [<span class="number">1.0</span>, <span class="number">1.0</span>, <span class="number">1.0</span>, <span class="number">1.0</span>, <span class="ident">texture</span>.<span class="number">0</span> <span class="kw">as</span> <span class="ident">f32</span>],
<span class="ident">FancyColor</span>::<span class="ident">ColoredTexture</span>(<span class="ident">color</span>, <span class="ident">texture</span>) <span class="op">=</span><span class="op">&gt;</span> {
[<span class="ident">color</span>.<span class="ident">r</span>, <span class="ident">color</span>.<span class="ident">g</span>, <span class="ident">color</span>.<span class="ident">b</span>, <span class="ident">color</span>.<span class="ident">a</span>, <span class="ident">texture</span>.<span class="number">0</span> <span class="kw">as</span> <span class="ident">f32</span>]
}
}
}

View File

@ -267,6 +267,7 @@
<span id="267">267</span>
<span id="268">268</span>
<span id="269">269</span>
<span id="270">270</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">assets</span>::<span class="ident">Assets</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">backend</span>::{<span class="ident">GfxCtxInnards</span>, <span class="ident">PrerenderInnards</span>};
@ -281,6 +282,7 @@
<span class="kw">const</span> <span class="ident">SCREENSPACE_Z</span>: <span class="ident">f32</span> <span class="op">=</span> <span class="number">0.5</span>;
<span class="kw">const</span> <span class="ident">TOOLTIP_Z</span>: <span class="ident">f32</span> <span class="op">=</span> <span class="number">0.0</span>;
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Uniforms</span> {
<span class="comment">// (cam_x, cam_y, cam_zoom)</span>
<span class="kw">pub</span> <span class="ident">transform</span>: [<span class="ident">f32</span>; <span class="number">3</span>],

View File

@ -226,6 +226,12 @@
<span id="226">226</span>
<span id="227">227</span>
<span id="228">228</span>
<span id="229">229</span>
<span id="230">230</span>
<span id="231">231</span>
<span id="232">232</span>
<span id="233">233</span>
<span id="234">234</span>
</pre><div class="example-wrap"><pre class="rust ">
<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>::{
@ -277,6 +283,12 @@
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">fancy_extend</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">color</span>: <span class="ident">FancyColor</span>, <span class="ident">polys</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">Polygon</span><span class="op">&gt;</span>) {
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="ident">polys</span> {
<span class="self">self</span>.<span class="ident">list</span>.<span class="ident">push</span>((<span class="ident">color</span>.<span class="ident">clone</span>(), <span class="ident">p</span>));
}
}
<span class="doccomment">/// Appends all colored polygons from another batch to the current one.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">append</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">other</span>: <span class="ident">GeomBatch</span>) {
<span class="self">self</span>.<span class="ident">list</span>.<span class="ident">extend</span>(<span class="ident">other</span>.<span class="ident">list</span>);

View File

@ -225,7 +225,7 @@
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">backend</span>::<span class="ident">Drawable</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">canvas</span>::{<span class="ident">Canvas</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">VerticalAlignment</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">color</span>::{<span class="ident">Color</span>, <span class="ident">FancyColor</span>, <span class="ident">LinearGradient</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">color</span>::{<span class="ident">Color</span>, <span class="ident">FancyColor</span>, <span class="ident">LinearGradient</span>, <span class="ident">Texture</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">drawing</span>::{<span class="ident">GfxCtx</span>, <span class="ident">Prerender</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">event</span>::{<span class="ident">hotkey</span>, <span class="ident">hotkeys</span>, <span class="ident">lctrl</span>, <span class="ident">Event</span>, <span class="ident">Key</span>, <span class="ident">MultiKey</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">event_ctx</span>::{<span class="ident">EventCtx</span>, <span class="ident">UpdateType</span>};

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 `backend_glow` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, backend_glow"><title>widgetry::backend_glow - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module backend_glow</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#structs">Structs</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'backend_glow', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/backend_glow.rs.html#1-349' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>backend_glow</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<!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 `backend_glow` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, backend_glow"><title>widgetry::backend_glow - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module backend_glow</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#structs">Structs</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'backend_glow', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/backend_glow.rs.html#1-352' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>backend_glow</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use crate::backend_glow_native::<a class="fn" href="../../widgetry/backend_glow_native/fn.setup.html" title="fn widgetry::backend_glow_native::setup">setup</a>;</code></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.Buffer.html" title='widgetry::backend_glow::Buffer struct'>Buffer</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Drawable.html" title='widgetry::backend_glow::Drawable struct'>Drawable</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.GfxCtxInnards.html" title='widgetry::backend_glow::GfxCtxInnards struct'>GfxCtxInnards</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.PrerenderInnards.html" title='widgetry::backend_glow::PrerenderInnards struct'>PrerenderInnards</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.VertexArray.html" title='widgetry::backend_glow::VertexArray struct'>VertexArray</a></td><td class='docblock-short'></td></tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
<table><tr class='module-item'><td><a class="type" href="type.WindowAdapter.html" title='widgetry::backend_glow::WindowAdapter type'>WindowAdapter</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 = "widgetry";</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

@ -0,0 +1,19 @@
<!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 `load_textures` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, load_textures"><title>widgetry::backend_glow_native::load_textures - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>backend_glow_native</a></p><script>window.sidebarCurrent = {name: 'load_textures', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/backend_glow_native.rs.html#118-292' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>backend_glow_native</a>::<wbr><a class="fn" href=''>load_textures</a></span></h1><pre class='rust fn'>fn load_textures(<br>&nbsp;&nbsp;&nbsp;&nbsp;gl: &amp;Context, <br>&nbsp;&nbsp;&nbsp;&nbsp;filename: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;sprite_length: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <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/std/error/trait.Error.html" title="trait std::error::Error">Error</a>&gt;&gt;</pre><div class='docblock'><p>Uploads a sprite sheet of textures to the GPU so they can be used by FancyColor::Texture and
friends to paint shapes.</p>
<p><code>path</code> - image file which is a grid of images.
<code>sprite_length</code> - the width and height of an individual cell in the image grid</p>
<p>The image file can have any number of sprites, but they must all be the same size.</p>
<p>Once uploaded, textures are addressed by their id, starting from 1, from left to right, top to
bottom, like so:</p>
<pre><code>┌─┬─┬─┐
│1│2│3│
├─┼─┼─┤
│4│5│6│
├─┼─┼─┤
│7│8│9│
└─┴─┴─┘</code></pre>
<p>Texture(0) is reserved for a pure white (no-op) texture.</p>
<p>Implementation is based on the the description of ArrayTextures from:
https://www.khronos.org/opengl/wiki/Array_Texture.</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `setup` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, setup"><title>widgetry::backend_glow_native::setup - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>backend_glow_native</a></p><script>window.sidebarCurrent = {name: 'setup', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/backend_glow_native.rs.html#6-74' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>backend_glow_native</a>::<wbr><a class="fn" href=''>setup</a></span></h1><pre class='rust fn'>pub fn setup(window_title: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../widgetry/backend_glow/struct.PrerenderInnards.html" title="struct widgetry::backend_glow::PrerenderInnards">PrerenderInnards</a>, EventLoop&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;<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 = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `setup` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, setup"><title>widgetry::backend_glow_native::setup - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>backend_glow_native</a></p><script>window.sidebarCurrent = {name: 'setup', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/backend_glow_native.rs.html#6-76' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>backend_glow_native</a>::<wbr><a class="fn" href=''>setup</a></span></h1><pre class='rust fn'>pub fn setup(window_title: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../widgetry/backend_glow/struct.PrerenderInnards.html" title="struct widgetry::backend_glow::PrerenderInnards">PrerenderInnards</a>, EventLoop&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;<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 = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,4 +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 `backend_glow_native` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, backend_glow_native"><title>widgetry::backend_glow_native - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module backend_glow_native</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</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'>widgetry</a></p><script>window.sidebarCurrent = {name: 'backend_glow_native', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/backend_glow_native.rs.html#1-91' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>backend_glow_native</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<!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 `backend_glow_native` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, backend_glow_native"><title>widgetry::backend_glow_native - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module backend_glow_native</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</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'>widgetry</a></p><script>window.sidebarCurrent = {name: 'backend_glow_native', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/backend_glow_native.rs.html#1-292' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>backend_glow_native</a></span></h1><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use crate::backend_glow::<a class="struct" href="../../widgetry/struct.Drawable.html" title="struct widgetry::Drawable">Drawable</a>;</code></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.WindowAdapter.html" title='widgetry::backend_glow_native::WindowAdapter struct'>WindowAdapter</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.setup.html" title='widgetry::backend_glow_native::setup fn'>setup</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 = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<table><tr class='module-item'><td><a class="fn" href="fn.load_textures.html" title='widgetry::backend_glow_native::load_textures fn'>load_textures</a></td><td class='docblock-short'><p>Uploads a sprite sheet of textures to the GPU so they can be used by FancyColor::Texture and
friends to paint shapes.</p>
</td></tr><tr class='module-item'><td><a class="fn" href="fn.setup.html" title='widgetry::backend_glow_native::setup fn'>setup</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 = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["setup",""]],"struct":[["WindowAdapter",""]]});
initSidebarItems({"fn":[["load_textures","Uploads a sprite sheet of textures to the GPU so they can be used by FancyColor::Texture and friends to paint shapes."],["setup",""]],"struct":[["WindowAdapter",""]]});

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,24 @@
<!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 `FancyColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, FancyColor"><title>widgetry::color::FancyColor - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum FancyColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.LinearGradient">LinearGradient</a><a href="#variant.RGBA">RGBA</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.style">style</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-Debug">Debug</a><a href="#impl-PartialEq%3CFancyColor%3E">PartialEq&lt;FancyColor&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</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-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><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'FancyColor', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#25-28' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="enum" href=''>FancyColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum FancyColor {
<!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 `FancyColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, FancyColor"><title>widgetry::color::FancyColor - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum FancyColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.ColoredTexture">ColoredTexture</a><a href="#variant.LinearGradient">LinearGradient</a><a href="#variant.RGBA">RGBA</a><a href="#variant.Texture">Texture</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.shader_style">shader_style</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-Debug">Debug</a><a href="#impl-PartialEq%3CFancyColor%3E">PartialEq&lt;FancyColor&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</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-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><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'FancyColor', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#25-46' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="enum" href=''>FancyColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum FancyColor {
RGBA(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
LinearGradient(<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>),
Texture(<a class="struct" href="../../widgetry/struct.Texture.html" title="struct widgetry::Texture">Texture</a>),
ColoredTexture(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>,&nbsp;<a class="struct" href="../../widgetry/struct.Texture.html" title="struct widgetry::Texture">Texture</a>),
}</pre></div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<div id="variant.RGBA" class="variant small-section-header"><a href="#variant.RGBA" class="anchor field"></a><code>RGBA(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>)</code></div><div id="variant.LinearGradient" class="variant small-section-header"><a href="#variant.LinearGradient" class="anchor field"></a><code>LinearGradient(<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>)</code></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.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#161-171' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.style' class="method"><code>pub(crate) fn <a href='#method.style' class='fnname'>style</a>(&amp;self, pt: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 4]</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#162-170' 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-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="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#24' 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="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#24' 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 id="variant.RGBA" class="variant small-section-header"><a href="#variant.RGBA" class="anchor field"></a><code>RGBA(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>)</code></div><div id="variant.LinearGradient" class="variant small-section-header"><a href="#variant.LinearGradient" class="anchor field"></a><code>LinearGradient(<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>)</code></div><div id="variant.Texture" class="variant small-section-header"><a href="#variant.Texture" class="anchor field"></a><code>Texture(<a class="struct" href="../../widgetry/struct.Texture.html" title="struct widgetry::Texture">Texture</a>)</code></div><div class='docblock'><p>Once uploaded, textures are addressed by their id, starting from 1, from left to right, top
to bottom, like so:</p>
<pre><code>┌─┬─┬─┐
│1│2│3│
├─┼─┼─┤
│4│5│6│
├─┼─┼─┤
│7│8│9│
└─┴─┴─┘</code></pre>
<p>Texture(0) is reserved for a pure white (no-op) texture.</p>
</div><div id="variant.ColoredTexture" class="variant small-section-header"><a href="#variant.ColoredTexture" class="anchor field"></a><code>ColoredTexture(<a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>,&nbsp;<a class="struct" href="../../widgetry/struct.Texture.html" title="struct widgetry::Texture">Texture</a>)</code></div><div class='docblock'><p>The <code>color</code> parameter is multiplied by any color baked into the texture, so typically this
only makes sense for grayscale textures.</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.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#199-213' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.shader_style' class="method"><code>pub(crate) fn <a href='#method.shader_style' class='fnname'>shader_style</a>(&amp;self, pt: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 5]</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#200-212' 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-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="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#24' 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="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#24' 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#131-133' 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-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#24' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#24' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CFancyColor%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a>&gt; for <a class="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl-PartialEq%3CFancyColor%3E' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#24' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#24' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>

View File

@ -1 +1 @@
<!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 `lerp` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, lerp"><title>widgetry::color::lerp - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'lerp', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#157-159' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="fn" href=''>lerp</a></span></h1><pre class='rust fn'>fn lerp(pct: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, (x1, x2): <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.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `lerp` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, lerp"><title>widgetry::color::lerp - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'lerp', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#195-197' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="fn" href=''>lerp</a></span></h1><pre class='rust fn'>fn lerp(pct: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, (x1, x2): <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.f32.html">f32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
<!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 `to_pct` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, to_pct"><title>widgetry::color::to_pct - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'to_pct', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#150-155' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="fn" href=''>to_pct</a></span></h1><pre class='rust fn'>fn to_pct(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, (low, high): <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `to_pct` fn in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, to_pct"><title>widgetry::color::to_pct - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'to_pct', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#188-193' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="fn" href=''>to_pct</a></span></h1><pre class='rust fn'>fn to_pct(value: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, (low, high): <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</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 `color` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, color"><title>widgetry::color - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module color</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'color', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#1-171' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>color</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.Color.html" title='widgetry::color::Color struct'>Color</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.LinearGradient.html" title='widgetry::color::LinearGradient struct'>LinearGradient</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<!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 `color` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, color"><title>widgetry::color - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module color</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'color', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#1-213' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>color</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.Color.html" title='widgetry::color::Color struct'>Color</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.LinearGradient.html" title='widgetry::color::LinearGradient struct'>LinearGradient</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Texture.html" title='widgetry::color::Texture struct'>Texture</a></td><td class='docblock-short'></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.FancyColor.html" title='widgetry::color::FancyColor enum'>FancyColor</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.lerp.html" title='widgetry::color::lerp fn'>lerp</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.to_pct.html" title='widgetry::color::to_pct fn'>to_pct</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 = "widgetry";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"enum":[["FancyColor",""]],"fn":[["lerp",""],["to_pct",""]],"struct":[["Color",""],["LinearGradient",""]]});
initSidebarItems({"enum":[["FancyColor",""]],"fn":[["lerp",""],["to_pct",""]],"struct":[["Color",""],["LinearGradient",""],["Texture",""]]});

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,13 @@
<!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 `LinearGradient` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, LinearGradient"><title>widgetry::color::LinearGradient - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct LinearGradient</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.line">line</a><a href="#structfield.stops">stops</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.interp">interp</a><a href="#method.new">new</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-Debug">Debug</a><a href="#impl-PartialEq%3CLinearGradient%3E">PartialEq&lt;LinearGradient&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</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-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><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'LinearGradient', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/widgetry/color.rs.html#108-111' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="struct" href=''>LinearGradient</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct LinearGradient {
<!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 `LinearGradient` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, LinearGradient"><title>widgetry::color::LinearGradient - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../widgetry/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct LinearGradient</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.line">line</a><a href="#structfield.stops">stops</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.interp">interp</a><a href="#method.new">new</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-Debug">Debug</a><a href="#impl-PartialEq%3CLinearGradient%3E">PartialEq&lt;LinearGradient&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</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-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><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a></p><script>window.sidebarCurrent = {name: 'LinearGradient', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/widgetry/color.rs.html#146-149' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>widgetry</a>::<wbr><a href='index.html'>color</a>::<wbr><a class="struct" href=''>LinearGradient</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct LinearGradient {
pub line: <a class="struct" href="../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a>,
pub stops: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;,
}</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.line" class="structfield small-section-header"><a href="#structfield.line" class="anchor field"></a><code>line: <a class="struct" href="../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a></code></span><span id="structfield.stops" class="structfield small-section-header"><a href="#structfield.stops" class="anchor field"></a><code>stops: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#113-148' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub(crate) fn <a href='#method.new' class='fnname'>new</a>(lg: &amp;<a class="struct" href="https://docs.rs/usvg/0.11.0/usvg/tree/nodes/struct.LinearGradient.html" title="struct usvg::tree::nodes::LinearGradient">LinearGradient</a>) -&gt; <a class="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#114-127' title='goto source code'>[src]</a></h4><h4 id='method.interp' class="method"><code>fn <a href='#method.interp' class='fnname'>interp</a>(&amp;self, pt: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#129-147' 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-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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#107' 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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#107' 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>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.line" class="structfield small-section-header"><a href="#structfield.line" class="anchor field"></a><code>line: <a class="struct" href="../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a></code></span><span id="structfield.stops" class="structfield small-section-header"><a href="#structfield.stops" class="anchor field"></a><code>stops: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#151-186' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub(crate) fn <a href='#method.new' class='fnname'>new</a>(lg: &amp;<a class="struct" href="https://docs.rs/usvg/0.11.0/usvg/tree/nodes/struct.LinearGradient.html" title="struct usvg::tree::nodes::LinearGradient">LinearGradient</a>) -&gt; <a class="enum" href="../../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#152-165' title='goto source code'>[src]</a></h4><h4 id='method.interp' class="method"><code>fn <a href='#method.interp' class='fnname'>interp</a>(&amp;self, pt: <a class="struct" href="../../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#167-185' 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-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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#145' 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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#145' 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#131-133' 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-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CLinearGradient%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>&gt; for <a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-PartialEq%3CLinearGradient%3E' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h3><div class='impl-items'></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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CLinearGradient%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>&gt; for <a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-PartialEq%3CLinearGradient%3E' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h3><div class='impl-items'></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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&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#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Downcast' class='impl'><code class='in-band'>impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can then be further <code>downcast</code> into <code>Box&lt;ConcreteType&gt;</code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
<!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 `drawing` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, drawing"><title>widgetry::drawing - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module drawing</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'drawing', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/drawing.rs.html#1-269' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>drawing</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<!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 `drawing` mod in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, drawing"><title>widgetry::drawing - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module drawing</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'drawing', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/drawing.rs.html#1-270' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>widgetry</a>::<wbr><a class="mod" href=''>drawing</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.GfxCtx.html" title='widgetry::drawing::GfxCtx struct'>GfxCtx</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Prerender.html" title='widgetry::drawing::Prerender struct'>Prerender</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Uniforms.html" title='widgetry::drawing::Uniforms struct'>Uniforms</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table><tr class='module-item'><td><a class="constant" href="constant.MAPSPACE_Z.html" title='widgetry::drawing::MAPSPACE_Z constant'>MAPSPACE_Z</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.SCREENSPACE_Z.html" title='widgetry::drawing::SCREENSPACE_Z constant'>SCREENSPACE_Z</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="constant" href="constant.TOOLTIP_Z.html" title='widgetry::drawing::TOOLTIP_Z constant'>TOOLTIP_Z</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 = "widgetry";</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

View File

@ -1,9 +1,24 @@
<!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 `FancyColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, FancyColor"><title>widgetry::FancyColor - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Enum FancyColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.LinearGradient">LinearGradient</a><a href="#variant.RGBA">RGBA</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.style">style</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-Debug">Debug</a><a href="#impl-PartialEq%3CFancyColor%3E">PartialEq&lt;FancyColor&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</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-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><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'FancyColor', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#25-28' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>widgetry</a>::<wbr><a class="enum" href=''>FancyColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum FancyColor {
<!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 `FancyColor` enum in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, FancyColor"><title>widgetry::FancyColor - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Enum FancyColor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.ColoredTexture">ColoredTexture</a><a href="#variant.LinearGradient">LinearGradient</a><a href="#variant.RGBA">RGBA</a><a href="#variant.Texture">Texture</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.shader_style">shader_style</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-Debug">Debug</a><a href="#impl-PartialEq%3CFancyColor%3E">PartialEq&lt;FancyColor&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</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-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><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'FancyColor', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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/color.rs.html#25-46' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='index.html'>widgetry</a>::<wbr><a class="enum" href=''>FancyColor</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>pub enum FancyColor {
RGBA(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>),
LinearGradient(<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>),
Texture(<a class="struct" href="../widgetry/struct.Texture.html" title="struct widgetry::Texture">Texture</a>),
ColoredTexture(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>,&nbsp;<a class="struct" href="../widgetry/struct.Texture.html" title="struct widgetry::Texture">Texture</a>),
}</pre></div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<div id="variant.RGBA" class="variant small-section-header"><a href="#variant.RGBA" class="anchor field"></a><code>RGBA(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>)</code></div><div id="variant.LinearGradient" class="variant small-section-header"><a href="#variant.LinearGradient" class="anchor field"></a><code>LinearGradient(<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>)</code></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.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#161-171' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.style' class="method"><code>pub(crate) fn <a href='#method.style' class='fnname'>style</a>(&amp;self, pt: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 4]</a></code><a class='srclink' href='../src/widgetry/color.rs.html#162-170' 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-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="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#24' 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="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a class='srclink' href='../src/widgetry/color.rs.html#24' 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 id="variant.RGBA" class="variant small-section-header"><a href="#variant.RGBA" class="anchor field"></a><code>RGBA(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>)</code></div><div id="variant.LinearGradient" class="variant small-section-header"><a href="#variant.LinearGradient" class="anchor field"></a><code>LinearGradient(<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>)</code></div><div id="variant.Texture" class="variant small-section-header"><a href="#variant.Texture" class="anchor field"></a><code>Texture(<a class="struct" href="../widgetry/struct.Texture.html" title="struct widgetry::Texture">Texture</a>)</code></div><div class='docblock'><p>Once uploaded, textures are addressed by their id, starting from 1, from left to right, top
to bottom, like so:</p>
<pre><code>┌─┬─┬─┐
│1│2│3│
├─┼─┼─┤
│4│5│6│
├─┼─┼─┤
│7│8│9│
└─┴─┴─┘</code></pre>
<p>Texture(0) is reserved for a pure white (no-op) texture.</p>
</div><div id="variant.ColoredTexture" class="variant small-section-header"><a href="#variant.ColoredTexture" class="anchor field"></a><code>ColoredTexture(<a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a>,&nbsp;<a class="struct" href="../widgetry/struct.Texture.html" title="struct widgetry::Texture">Texture</a>)</code></div><div class='docblock'><p>The <code>color</code> parameter is multiplied by any color baked into the texture, so typically this
only makes sense for grayscale textures.</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.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#199-213' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.shader_style' class="method"><code>pub(crate) fn <a href='#method.shader_style' class='fnname'>shader_style</a>(&amp;self, pt: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">; 5]</a></code><a class='srclink' href='../src/widgetry/color.rs.html#200-212' 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-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="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#24' 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="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a class='srclink' href='../src/widgetry/color.rs.html#24' 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#131-133' 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-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#24' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/widgetry/color.rs.html#24' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CFancyColor%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a>&gt; for <a class="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a href='#impl-PartialEq%3CFancyColor%3E' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#24' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/color.rs.html#24' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>

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,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 `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="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module geom</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'geom', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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-228' 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>
<!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="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc 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'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module geom</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class='location'><a href='../index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'geom', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><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-234' 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'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "widgetry";</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

@ -26,7 +26,7 @@
</td></tr><tr class='module-item'><td><a class="struct" href="struct.GfxCtx.html" title='widgetry::GfxCtx struct'>GfxCtx</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.LinePlot.html" title='widgetry::LinePlot struct'>LinePlot</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.LinearGradient.html" title='widgetry::LinearGradient struct'>LinearGradient</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Menu.html" title='widgetry::Menu struct'>Menu</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Panel.html" title='widgetry::Panel struct'>Panel</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.PersistentSplit.html" title='widgetry::PersistentSplit struct'>PersistentSplit</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.PlotOptions.html" title='widgetry::PlotOptions struct'>PlotOptions</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Prerender.html" title='widgetry::Prerender struct'>Prerender</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.ScatterPlot.html" title='widgetry::ScatterPlot struct'>ScatterPlot</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.ScreenDims.html" title='widgetry::ScreenDims struct'>ScreenDims</a></td><td class='docblock-short'><p>ScreenDims is in units of logical pixels, as opposed to physical pixels.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.ScreenPt.html" title='widgetry::ScreenPt struct'>ScreenPt</a></td><td class='docblock-short'><p>ScreenPt is in units of logical pixels, as opposed to physical pixels.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.ScreenRectangle.html" title='widgetry::ScreenRectangle struct'>ScreenRectangle</a></td><td class='docblock-short'><p>ScreenRectangle is in units of logical pixels, as opposed to physical pixels.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Series.html" title='widgetry::Series struct'>Series</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Settings.html" title='widgetry::Settings struct'>Settings</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Slider.html" title='widgetry::Slider struct'>Slider</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Spinner.html" title='widgetry::Spinner struct'>Spinner</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Style.html" title='widgetry::Style struct'>Style</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Text.html" title='widgetry::Text struct'>Text</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.TextSpan.html" title='widgetry::TextSpan struct'>TextSpan</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.UserInput.html" title='widgetry::UserInput struct'>UserInput</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Warper.html" title='widgetry::Warper struct'>Warper</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Widget.html" title='widgetry::Widget struct'>Widget</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.WidgetOutput.html" title='widgetry::WidgetOutput struct'>WidgetOutput</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.Series.html" title='widgetry::Series struct'>Series</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Settings.html" title='widgetry::Settings struct'>Settings</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Slider.html" title='widgetry::Slider struct'>Slider</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Spinner.html" title='widgetry::Spinner struct'>Spinner</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Style.html" title='widgetry::Style struct'>Style</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Text.html" title='widgetry::Text struct'>Text</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.TextSpan.html" title='widgetry::TextSpan struct'>TextSpan</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Texture.html" title='widgetry::Texture struct'>Texture</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.UserInput.html" title='widgetry::UserInput struct'>UserInput</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Warper.html" title='widgetry::Warper struct'>Warper</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Widget.html" title='widgetry::Widget struct'>Widget</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.WidgetOutput.html" title='widgetry::WidgetOutput struct'>WidgetOutput</a></td><td class='docblock-short'></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.Event.html" title='widgetry::Event enum'>Event</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.FancyColor.html" title='widgetry::FancyColor enum'>FancyColor</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.HorizontalAlignment.html" title='widgetry::HorizontalAlignment enum'>HorizontalAlignment</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.Key.html" title='widgetry::Key enum'>Key</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.MultiKey.html" title='widgetry::MultiKey enum'>MultiKey</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.Outcome.html" title='widgetry::Outcome enum'>Outcome</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.RewriteColor.html" title='widgetry::RewriteColor enum'>RewriteColor</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.UpdateType.html" title='widgetry::UpdateType enum'>UpdateType</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.VerticalAlignment.html" title='widgetry::VerticalAlignment enum'>VerticalAlignment</a></td><td class='docblock-short'></td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table><tr class='module-item'><td><a class="trait" href="trait.GUI.html" title='widgetry::GUI trait'>GUI</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="trait" href="trait.TextExt.html" title='widgetry::TextExt trait'>TextExt</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="trait" href="trait.WidgetImpl.html" title='widgetry::WidgetImpl trait'>WidgetImpl</a></td><td class='docblock-short'><p>Create a new widget by implementing this trait. You can instantiate your widget by calling
<code>Widget::new(Box::new(instance of your new widget))</code>, which gives you the usual style options.</p>

View File

@ -1 +1 @@
initSidebarItems({"enum":[["Event",""],["FancyColor",""],["HorizontalAlignment",""],["Key",""],["MultiKey",""],["Outcome",""],["RewriteColor",""],["UpdateType",""],["VerticalAlignment",""]],"fn":[["Line",""],["hotkey",""],["hotkeys",""],["lctrl",""],["run",""]],"mod":[["assets",""],["backend",""],["backend_glow",""],["backend_glow_native",""],["canvas",""],["color",""],["drawing",""],["event",""],["event_ctx",""],["geom",""],["input",""],["runner",""],["screen_geom",""],["style",""],["svg",""],["text",""],["tools",""],["widgets",""]],"struct":[["AreaSlider",""],["Autocomplete",""],["Btn",""],["Canvas",""],["Checkbox",""],["Choice",""],["Color",""],["CompareTimes",""],["DrawWithTooltips",""],["Drawable",""],["EventCtx",""],["FanChart",""],["Filler",""],["GeomBatch","A mutable builder for a group of colored polygons."],["GfxCtx",""],["LinePlot",""],["LinearGradient",""],["Menu",""],["Panel",""],["PersistentSplit",""],["PlotOptions",""],["Prerender",""],["ScatterPlot",""],["ScreenDims","ScreenDims is in units of logical pixels, as opposed to physical pixels."],["ScreenPt","ScreenPt is in units of logical pixels, as opposed to physical pixels."],["ScreenRectangle","ScreenRectangle is in units of logical pixels, as opposed to physical pixels."],["Series",""],["Settings",""],["Slider",""],["Spinner",""],["Style",""],["Text",""],["TextSpan",""],["UserInput",""],["Warper",""],["Widget",""],["WidgetOutput",""]],"trait":[["GUI",""],["TextExt",""],["WidgetImpl","Create a new widget by implementing this trait. You can instantiate your widget by calling `Widget::new(Box::new(instance of your new widget))`, which gives you the usual style options."]]});
initSidebarItems({"enum":[["Event",""],["FancyColor",""],["HorizontalAlignment",""],["Key",""],["MultiKey",""],["Outcome",""],["RewriteColor",""],["UpdateType",""],["VerticalAlignment",""]],"fn":[["Line",""],["hotkey",""],["hotkeys",""],["lctrl",""],["run",""]],"mod":[["assets",""],["backend",""],["backend_glow",""],["backend_glow_native",""],["canvas",""],["color",""],["drawing",""],["event",""],["event_ctx",""],["geom",""],["input",""],["runner",""],["screen_geom",""],["style",""],["svg",""],["text",""],["tools",""],["widgets",""]],"struct":[["AreaSlider",""],["Autocomplete",""],["Btn",""],["Canvas",""],["Checkbox",""],["Choice",""],["Color",""],["CompareTimes",""],["DrawWithTooltips",""],["Drawable",""],["EventCtx",""],["FanChart",""],["Filler",""],["GeomBatch","A mutable builder for a group of colored polygons."],["GfxCtx",""],["LinePlot",""],["LinearGradient",""],["Menu",""],["Panel",""],["PersistentSplit",""],["PlotOptions",""],["Prerender",""],["ScatterPlot",""],["ScreenDims","ScreenDims is in units of logical pixels, as opposed to physical pixels."],["ScreenPt","ScreenPt is in units of logical pixels, as opposed to physical pixels."],["ScreenRectangle","ScreenRectangle is in units of logical pixels, as opposed to physical pixels."],["Series",""],["Settings",""],["Slider",""],["Spinner",""],["Style",""],["Text",""],["TextSpan",""],["Texture",""],["UserInput",""],["Warper",""],["Widget",""],["WidgetOutput",""]],"trait":[["GUI",""],["TextExt",""],["WidgetImpl","Create a new widget by implementing this trait. You can instantiate your widget by calling `Widget::new(Box::new(instance of your new widget))`, which gives you the usual style options."]]});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,13 @@
<!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 `LinearGradient` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, LinearGradient"><title>widgetry::LinearGradient - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct LinearGradient</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.line">line</a><a href="#structfield.stops">stops</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.interp">interp</a><a href="#method.new">new</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-Debug">Debug</a><a href="#impl-PartialEq%3CLinearGradient%3E">PartialEq&lt;LinearGradient&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</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-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><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'LinearGradient', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/widgetry/color.rs.html#108-111' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>widgetry</a>::<wbr><a class="struct" href=''>LinearGradient</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct LinearGradient {
<!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 `LinearGradient` struct in crate `widgetry`."><meta name="keywords" content="rust, rustlang, rust-lang, LinearGradient"><title>widgetry::LinearGradient - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../widgetry/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct LinearGradient</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.line">line</a><a href="#structfield.stops">stops</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.interp">interp</a><a href="#method.new">new</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-Debug">Debug</a><a href="#impl-PartialEq%3CLinearGradient%3E">PartialEq&lt;LinearGradient&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</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-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><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='index.html'>widgetry</a></p><script>window.sidebarCurrent = {name: 'LinearGradient', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/widgetry/color.rs.html#146-149' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>widgetry</a>::<wbr><a class="struct" href=''>LinearGradient</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct LinearGradient {
pub line: <a class="struct" href="../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a>,
pub stops: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;,
}</pre></div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.line" class="structfield small-section-header"><a href="#structfield.line" class="anchor field"></a><code>line: <a class="struct" href="../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a></code></span><span id="structfield.stops" class="structfield small-section-header"><a href="#structfield.stops" class="anchor field"></a><code>stops: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#113-148' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub(crate) fn <a href='#method.new' class='fnname'>new</a>(lg: &amp;<a class="struct" href="https://docs.rs/usvg/0.11.0/usvg/tree/nodes/struct.LinearGradient.html" title="struct usvg::tree::nodes::LinearGradient">LinearGradient</a>) -&gt; <a class="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a class='srclink' href='../src/widgetry/color.rs.html#114-127' title='goto source code'>[src]</a></h4><h4 id='method.interp' class="method"><code>fn <a href='#method.interp' class='fnname'>interp</a>(&amp;self, pt: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class='srclink' href='../src/widgetry/color.rs.html#129-147' 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-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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#107' 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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a class='srclink' href='../src/widgetry/color.rs.html#107' 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>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.line" class="structfield small-section-header"><a href="#structfield.line" class="anchor field"></a><code>line: <a class="struct" href="../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a></code></span><span id="structfield.stops" class="structfield small-section-header"><a href="#structfield.stops" class="anchor field"></a><code>stops: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#151-186' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code>pub(crate) fn <a href='#method.new' class='fnname'>new</a>(lg: &amp;<a class="struct" href="https://docs.rs/usvg/0.11.0/usvg/tree/nodes/struct.LinearGradient.html" title="struct usvg::tree::nodes::LinearGradient">LinearGradient</a>) -&gt; <a class="enum" href="../widgetry/enum.FancyColor.html" title="enum widgetry::FancyColor">FancyColor</a></code><a class='srclink' href='../src/widgetry/color.rs.html#152-165' title='goto source code'>[src]</a></h4><h4 id='method.interp' class="method"><code>fn <a href='#method.interp' class='fnname'>interp</a>(&amp;self, pt: <a class="struct" href="../geom/pt/struct.Pt2D.html" title="struct geom::pt::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../widgetry/struct.Color.html" title="struct widgetry::Color">Color</a></code><a class='srclink' href='../src/widgetry/color.rs.html#167-185' 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-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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#145' 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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a class='srclink' href='../src/widgetry/color.rs.html#145' 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#131-133' 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-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CLinearGradient%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>&gt; for <a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-PartialEq%3CLinearGradient%3E' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#107' title='goto source code'>[src]</a></h3><div class='impl-items'></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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-PartialEq%3CLinearGradient%3E' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>&gt; for <a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-PartialEq%3CLinearGradient%3E' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.eq' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: &amp;<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id='method.ne' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: &amp;<a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-StructuralPartialEq' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../widgetry/struct.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-StructuralPartialEq' class='anchor'></a><a class='srclink' href='../src/widgetry/color.rs.html#145' title='goto source code'>[src]</a></h3><div class='impl-items'></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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</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.LinearGradient.html" title="struct widgetry::LinearGradient">LinearGradient</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-217' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-216' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&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#220-224' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221-223' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Downcast' class='impl'><code class='in-band'>impl&lt;T&gt; Downcast for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a>,&nbsp;</span></code><a href='#impl-Downcast' class='anchor'></a></h3><div class='impl-items'><h4 id='method.into_any' class="method hidden"><code>fn <a href='#method.into_any' class='fnname'>into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;T&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static&gt;</code></h4><div class='docblock hidden'><p>Convert <code>Box&lt;dyn Trait&gt;</code> (where <code>Trait: Downcast</code>) to <code>Box&lt;dyn Any&gt;</code>. <code>Box&lt;dyn Any&gt;</code> can then be further <code>downcast</code> into <code>Box&lt;ConcreteType&gt;</code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any">Read more</a></p>

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