Struct lux::graphics::ContainedSprite
[−]
[src]
#[must_use = "Sprites only contain context, and must be drawn with `draw()`"]
pub struct ContainedSprite<'a, C: 'a> {
// some fields omitted
}A sprite that can be drawn to the screen.
Methods
impl<'a, C> ContainedSprite<'a, C> where C: Canvas + 'a
fn size(&mut self, w: Float, h: Float) -> &mut ContainedSprite<'a, C>
Sets the side of the sprite when drawn to the screen.
The default size is the "ideal size", that is, 1 pixel in the texture goes to 1 pixel on the screen.
fn draw(&mut self)
Draws the sprite to the screen.