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

Function bloom_draw_text

native/ios/src/lib.rs:862–868  ·  view source on GitHub ↗
(text_ptr: *const u8, x: f64, y: f64, size: f64, r: f64, g: f64, b: f64, a: f64)

Source from the content-addressed store, hash-verified

860
861#[no_mangle]
862pub extern "C" fn bloom_draw_text(text_ptr: *const u8, x: f64, y: f64, size: f64, r: f64, g: f64, b: f64, a: f64) {
863 let text = str_from_header(text_ptr);
864 let eng = engine();
865 let mut text_renderer = std::mem::replace(&mut eng.text, bloom_shared::text_renderer::TextRenderer::empty());
866 text_renderer.draw_text(&mut eng.renderer, text, x, y, size as u32, r, g, b, a);
867 eng.text = text_renderer;
868}
869
870#[no_mangle]
871pub extern "C" fn bloom_measure_text(text_ptr: *const u8, size: f64) -> f64 {

Callers 2

drawTextFunction · 0.50
drawTextRgbaFunction · 0.50

Calls 3

str_from_headerFunction · 0.85
draw_textMethod · 0.80
engineFunction · 0.70

Tested by

no test coverage detected