# Method SDL.blit_surface()

Method blit_surface

  `int blit_surface(SDL.Surface src, SDL.Surface dst, SDL.Rect|void srcrect, SDL.Rect|void dstrect)`

Description

  Peforms a fast blit from the source surface to the destination surface.

  The final blit rectangle is stored in `dstrect`. This may differ from `srcrect` if there was clipping.

  This function should not be called on a locked surface.

Parameter `src`

  The surface to be copied.

Parameter `dst`

  The destination surface. This will usually be your main screen, initialized with a call to SDL.set_video_mode().

Parameter `srcrect`

  The rectangular section of `src` to copy. If the whole surface is to be copied, you can set this to `0`.

Parameter `dstrect`

  Where the source surface should be copied to on the destination surface. Only the `x` and `y` fields of the SDL.Rect object are used. To copy `src` to the top-left corner of `dst`, i.e. at coordinates <0,0>, you can set this to `0`.

Returns

  If successful, 0, otherwise -1.

See also

  SDL.Surface()->blit()