Pygame - surface.blit() function Last Updated : 23 May, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 Surfacedest - 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 Python3 # import pygame module import pygame pygame.init() # width width = 680 # height height = 480 #store he screen size z = [width,height] # store the color white = (255, 255, 255) screen_display = pygame.display # Set caption of screen screen_display.set_caption('GEEKSFORGEEKS') # setting the size of the window surface = screen_display.set_mode(z) # set the image which to be displayed on screen python = pygame.image.load('bg.jpg') # set window true window = True while window: for event in pygame.event.get(): if event.type == pygame.QUIT: window = False # display white on screen other than image surface.fill(white) # draw on image onto another surface.blit(python,(50, 50)) screen_display.update() pygame.quit() Output: Comment More infoAdvertise with us Next Article PYGLET â Shape Position C chetanjha888 Follow Improve Article Tags : Python Python-PyGame Practice Tags : python Similar Reads Pygame - Surface When using Pygame, surfaces are generally used to represent the appearance of the object and its position on the screen. All the objects, text, images that we create in Pygame are created using surfaces. Creating a surface Creating surfaces in pygame is quite easy. We just have to pass the height an 6 min read Introduction to pygame Pygame is a set of Python modules designed for writing video games. It adds functionality on top of the excellent SDL library, enabling you to create fully-featured games and multimedia programs in the Python language. It's key benefits include:Beginner-Friendly: Simple Python syntax makes it ideal 4 min read PYGLET â Shape Position In this article, we will see how we can access the position of the shape in PYGLET module in python. Pyglet is easy to use but powerful library for developing visually rich GUI applications like games, multimedia, etc. A window is a "heavyweight" object occupying operating system resources. Windows 3 min read Pygame - Control Sprites In this article, we will discuss how to control the sprite, like moving forward, backward, slow, or accelerate, and some of the properties that sprite should have. We will be adding event handlers to our program to respond to keystroke events, when the player uses the arrow keys on the keyboard we w 4 min read Mouse Clicks on Sprites in PyGame The interactiveness of your game can be significantly increased by using Pygame to respond to mouse clicks on sprites. You may develop unique sprite classes that manage mouse events and react to mouse clicks with the aid of Pygame's sprite module. This article will teach you how to use Pygame to mak 3 min read Wand shade() function - Python The shade() function is an inbuilt function in the Python Wand ImageMagick library which is used to generates create a 3D effect by simulating a light from an elevated angle. Syntax: shade(gray, azimuth, elevation) Parameters: This function accepts three parameters as mentioned above and defined bel 2 min read Like