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

pub trait Drawable {
    fn draw_ex(&self, ctx: &mut Context, param: DrawParam) -> GameResult<()>;

    fn draw(
        &self,
        ctx: &mut Context,
        dest: Point,
        rotation: f32
    ) -> 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.

Provided Methods

Draws the drawable onto the rendering target.

It just is a shortcut that calls draw_ex() with some sane defaults.

  • ctx - The Context this graphic will be rendered to.
  • dest - the position to draw the graphic expressed as a Point.
  • rotation - orientation of the graphic in radians.

Implementors