VOOZH about

URL: https://www.geeksforgeeks.org/python/pygame-surface-blit-function/

⇱ Pygame - surface.blit() function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Pygame - surface.blit() function

Last Updated : 23 May, 2021

surface.blit() function draws a source Surface onto this Surface. The draw can be positioned with the dest argument. The dest argument can either be a pair of coordinates representing the position of the upper left corner of the blit or a Rect, where the upper left corner of the rectangle will be used as the position for the blit. The size of the destination rectangle does not affect the blit.

Syntax : blit(source, dest, area=None, special_flags=0) -> Rect

Parameters:

  • Source - Draws a source Surface onto this Surface
  • dest - The draw can be positioned with the dest argument.
  • area -A Rect can also be passed as the destination and the topleft corner of the rectangle will be used as the position for the blit

Output:

👁 Image
Comment
Article Tags:
Article Tags: