Files
phy/bevy_text/fn.update_text2d_layout.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

19 lines
8.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="Updates the layout and size information whenever the text or style is changed. This information is computed by the `TextPipeline` on insertion, then stored."><title>update_text2d_layout in bevy_text - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="bevy_text" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../bevy_text/index.html">bevy_<wbr>text</a><span class="version">0.15.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">update_<wbr>text2d_<wbr>layout</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#world-resources" title="World Resources">World Resources</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate bevy_<wbr>text</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">bevy_text</a></span><h1>Function <span class="fn">update_text2d_layout</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/bevy_text/text2d.rs.html#236-318">Source</a> </span></div><pre class="rust item-decl"><code>pub fn update_text2d_layout(
last_scale_factor: <a class="struct" href="../bevy_ecs/system/system_param/struct.Local.html" title="struct bevy_ecs::system::system_param::Local">Local</a>&lt;'_, <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
queue: <a class="struct" href="../bevy_ecs/system/system_param/struct.Local.html" title="struct bevy_ecs::system::system_param::Local">Local</a>&lt;'_, <a class="type" href="../bevy_utils/type.HashSet.html" title="type bevy_utils::HashSet">HashSet</a>&lt;<a class="struct" href="../bevy_ecs/entity/struct.Entity.html" title="struct bevy_ecs::entity::Entity">Entity</a>&gt;&gt;,
textures: <a class="struct" href="../bevy_ecs/change_detection/struct.ResMut.html" title="struct bevy_ecs::change_detection::ResMut">ResMut</a>&lt;'_, <a class="struct" href="../bevy_asset/assets/struct.Assets.html" title="struct bevy_asset::assets::Assets">Assets</a>&lt;<a class="struct" href="../bevy_image/image/struct.Image.html" title="struct bevy_image::image::Image">Image</a>&gt;&gt;,
fonts: <a class="struct" href="../bevy_ecs/change_detection/struct.Res.html" title="struct bevy_ecs::change_detection::Res">Res</a>&lt;'_, <a class="struct" href="../bevy_asset/assets/struct.Assets.html" title="struct bevy_asset::assets::Assets">Assets</a>&lt;<a class="struct" href="struct.Font.html" title="struct bevy_text::Font">Font</a>&gt;&gt;,
windows: <a class="struct" href="../bevy_ecs/system/query/struct.Query.html" title="struct bevy_ecs::system::query::Query">Query</a>&lt;'_, '_, &amp;<a class="struct" href="../bevy_window/window/struct.Window.html" title="struct bevy_window::window::Window">Window</a>, <a class="struct" href="../bevy_ecs/query/filter/struct.With.html" title="struct bevy_ecs::query::filter::With">With</a>&lt;<a class="struct" href="../bevy_window/window/struct.PrimaryWindow.html" title="struct bevy_window::window::PrimaryWindow">PrimaryWindow</a>&gt;&gt;,
texture_atlases: <a class="struct" href="../bevy_ecs/change_detection/struct.ResMut.html" title="struct bevy_ecs::change_detection::ResMut">ResMut</a>&lt;'_, <a class="struct" href="../bevy_asset/assets/struct.Assets.html" title="struct bevy_asset::assets::Assets">Assets</a>&lt;<a class="struct" href="../bevy_sprite/texture_atlas/struct.TextureAtlasLayout.html" title="struct bevy_sprite::texture_atlas::TextureAtlasLayout">TextureAtlasLayout</a>&gt;&gt;,
font_atlas_sets: <a class="struct" href="../bevy_ecs/change_detection/struct.ResMut.html" title="struct bevy_ecs::change_detection::ResMut">ResMut</a>&lt;'_, <a class="struct" href="struct.FontAtlasSets.html" title="struct bevy_text::FontAtlasSets">FontAtlasSets</a>&gt;,
text_pipeline: <a class="struct" href="../bevy_ecs/change_detection/struct.ResMut.html" title="struct bevy_ecs::change_detection::ResMut">ResMut</a>&lt;'_, <a class="struct" href="struct.TextPipeline.html" title="struct bevy_text::TextPipeline">TextPipeline</a>&gt;,
text_query: <a class="struct" href="../bevy_ecs/system/query/struct.Query.html" title="struct bevy_ecs::system::query::Query">Query</a>&lt;'_, '_, (<a class="struct" href="../bevy_ecs/entity/struct.Entity.html" title="struct bevy_ecs::entity::Entity">Entity</a>, <a class="struct" href="../bevy_ecs/change_detection/struct.Ref.html" title="struct bevy_ecs::change_detection::Ref">Ref</a>&lt;'_, <a class="struct" href="struct.TextLayout.html" title="struct bevy_text::TextLayout">TextLayout</a>&gt;, <a class="struct" href="../bevy_ecs/change_detection/struct.Ref.html" title="struct bevy_ecs::change_detection::Ref">Ref</a>&lt;'_, <a class="struct" href="struct.TextBounds.html" title="struct bevy_text::TextBounds">TextBounds</a>&gt;, &amp;mut <a class="struct" href="struct.TextLayoutInfo.html" title="struct bevy_text::TextLayoutInfo">TextLayoutInfo</a>, &amp;mut <a class="struct" href="struct.ComputedTextBlock.html" title="struct bevy_text::ComputedTextBlock">ComputedTextBlock</a>)&gt;,
text_reader: <a class="type" href="type.Text2dReader.html" title="type bevy_text::Text2dReader">Text2dReader</a>&lt;'_, '_&gt;,
font_system: <a class="struct" href="../bevy_ecs/change_detection/struct.ResMut.html" title="struct bevy_ecs::change_detection::ResMut">ResMut</a>&lt;'_, <a class="struct" href="struct.CosmicFontSystem.html" title="struct bevy_text::CosmicFontSystem">CosmicFontSystem</a>&gt;,
swash_cache: <a class="struct" href="../bevy_ecs/change_detection/struct.ResMut.html" title="struct bevy_ecs::change_detection::ResMut">ResMut</a>&lt;'_, <a class="struct" href="struct.SwashCache.html" title="struct bevy_text::SwashCache">SwashCache</a>&gt;,
)</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Updates the layout and size information whenever the text or style is changed.
This information is computed by the <a href="struct.TextPipeline.html" title="struct bevy_text::TextPipeline"><code>TextPipeline</code></a> on insertion, then stored.</p>
<h3 id="world-resources"><a class="doc-anchor" href="#world-resources">§</a>World Resources</h3>
<p><a href="../bevy_asset/assets/struct.Assets.html" title="struct bevy_asset::assets::Assets"><code>ResMut&lt;Assets&lt;Image&gt;&gt;</code></a> This system only adds new <a href="../bevy_image/image/struct.Image.html" title="struct bevy_image::image::Image"><code>Image</code></a> assets.
It does not modify or observe existing ones.</p>
</div></details></section></div></main></body></html>