MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / measure_text

Method measure_text

native/shared/src/text_renderer.rs:216–218  ·  view source on GitHub ↗
(&mut self, text: &str, size: u32)

Source from the content-addressed store, hash-verified

214 }
215
216 pub fn measure_text(&mut self, text: &str, size: u32) -> f64 {
217 self.measure_text_ex(0, text, size, 0.0)
218 }
219
220 pub fn measure_text_ex(&mut self, font_idx: usize, text: &str, size: u32, spacing: f32) -> f64 {
221 let idx = if font_idx < self.fonts.len() { font_idx } else { 0 };

Callers 7

bloom_measure_textFunction · 0.80
bloom_measure_textFunction · 0.80
bloom_measure_textFunction · 0.80
bloom_measure_textFunction · 0.80
bloom_measure_textFunction · 0.80
bloom_measure_text_strFunction · 0.80
bloom_measure_textFunction · 0.80

Calls 1

measure_text_exMethod · 0.80

Tested by

no test coverage detected