pub fn draw(&self, ctx: &mut ggez::Context) -> ggez::GameResult {
		let (centre_x, centre_y) = self.centre_position;
		let offset_x = centre_x / self.image.width() as f32;
		let offset_y = centre_y / self.image.height() as f32;

		let (scale_x, scale_y) = self.scale;
		let (position_x, position_y) = self.position;
		let draw_params = graphics::DrawParam::new()
			.dest([position_x, position_y])
			.offset([offset_x, offset_y])
			.scale([scale_x, scale_y])
			.color(self.colour.into());
		graphics::draw(ctx, &self.image, draw_params)
	}
/// Draws the instance to the screen.
Draws the instance to the screen.
Draws the instance to the screen .
pub fn draw(&self, ctx: &mut ggez::Context) -> ggez::GameResult {
		let (centre_x, centre_y) = self.centre_position;
		let offset_x = centre_x / self.image.width() as f32;
		let offset_y = centre_y / self.image.height() as f32;
		let (scale_x, scale_y) = self.scale;
		let (position_x, position_y) = self.position;
		let draw_params = graphics::DrawParam::new()
			.dest([position_x, position_y])
			.offset([offset_x, offset_y])
			.scale([scale_x, scale_y])
			.color(self.colour.into());
		graphics::draw(ctx, &self.image, draw_params)
	}
pub fn draw ( & self , ctx : & mut ggez :: Context ) -> ggez :: GameResult { let ( centre_x , centre_y ) = self . centre_position ; let offset_x = centre_x / self . image . width ( ) as f32 ; let offset_y = centre_y / self . image . height ( ) as f32 ; let ( scale_x , scale_y ) = self . scale ; let ( position_x , position_y ) = self . position ; let draw_params = graphics :: DrawParam :: new ( ) . dest ( [ position_x , position_y ] ) . offset ( [ offset_x , offset_y ] ) . scale ( [ scale_x , scale_y ] ) . color ( self . colour . into ( ) ) ; graphics :: draw ( ctx , & self . image , draw_params ) }
Draws the instance to the screen.
Draws the instance to the screen .
&self
ctx
&mut ggez::Context
&self
ctx
&mut ggez::Context