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

Method sprite

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

Selects a particular sprite for drawing Future drawing actions are sent to this sprite: use something like `Layer(0)` to start drawing to a layer again. Sprites can be repeatedly re-rendered with a single command and their appearance may be cached for efficiency. Actions that affect the whole canvas or layers are not permitted in sprites.

(&mut self, sprite_id: SpriteId)

Source from the content-addressed store, hash-verified

182 /// cached for efficiency. Actions that affect the whole canvas or layers are not permitted in
183 /// sprites.
184 fn sprite(&mut self, sprite_id: SpriteId) { self.draw(Draw::Sprite(sprite_id)); }
185
186 /// Releases the resources used by the current sprite
187 fn clear_sprite(&mut self) { self.draw(Draw::ClearSprite); }

Callers 10

drawMethod · 0.80
randomMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
section_spritesFunction · 0.80

Implementers 3

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

Calls 1

drawMethod · 0.45