Trait ggez::graphics::Drawable [] [src]

pub trait Drawable {
    fn draw_ex(&self, context: &mut Context, src: Option<Rect>, dst: Option<Rect>, angle: f64, center: Option<Point>, flip_horizontal: bool, flip_vertical: bool) -> GameResult<()>;

    fn draw(&self, context: &mut Context, src: Option<Rect>, dst: Option<Rect>) -> GameResult<()> { ... }
}

All types that can be drawn on the screen implement the Drawable trait.

Required Methods

Actually draws the object to the screen. This is the most general version of the operation, which is all that is required for implementing this trait. (It also maps nicely onto SDL2's Renderer::copy_ex(), we might want to wrap the types up a bit more nicely someday.)

Provided Methods

Draws the drawable onto the rendering target.

Implementors