MCPcopy Create free account
hub / github.com/Logicalshift/flo_draw / set_texture_bytes

Method set_texture_bytes

canvas/src/context.rs:247–249  ·  view source on GitHub ↗

Sets the bitmap data for a texture, in the format specified by the call to create_texture()

(&mut self, texture_id: TextureId, x: u32, y: u32, width: u32, height: u32, bytes: Arc<Vec<u8>>)

Source from the content-addressed store, hash-verified

245
246 /// Sets the bitmap data for a texture, in the format specified by the call to create_texture()
247 fn set_texture_bytes(&mut self, texture_id: TextureId, x: u32, y: u32, width: u32, height: u32, bytes: Arc<Vec<u8>>) {
248 self.draw(Draw::Texture(texture_id, TextureOp::SetBytes(x, y, width, height, bytes)));
249 }
250
251 /// Applies an alpha value to a texture
252 fn set_texture_fill_alpha(&mut self, texture_id: TextureId, alpha: f32) {

Callers 4

load_textureMethod · 0.80
drawMethod · 0.80
draw_mandelbrotFunction · 0.80
section_texturesFunction · 0.80

Implementers 3

font_line_layout.rscanvas/src/font_line_layout.rs
context.rscanvas/src/context.rs
canvas.rscanvas/src/canvas.rs

Calls 2

TextureClass · 0.85
drawMethod · 0.45

Tested by

no test coverage detected