pygame draw circle
window = pygame.display.set_mode(300, 300)
colour = (0,0,255) #green
circle_x_&_y = (150, 50)
circle_radius = 12
border_width = 0 #0 = filled circle
pygame.draw.circle(window, colour, circle_x_&_y, circle_radius, border_width)
pygame draw circle
window = pygame.display.set_mode(300, 300)
colour = (0,0,255) #green
circle_x_&_y = (150, 50)
circle_radius = 12
border_width = 0 #0 = filled circle
pygame.draw.circle(window, colour, circle_x_&_y, circle_radius, border_width)
draw image pygame
import pygame as pg
pg.init()
screen = pg.display.set_mode((display_width,display_height))
# load the image in with file name
yourImg = pg.image.load('yourImg.png')
def showImg(x,y):
# pass the image and x,y values to screen
screen.blit(yourImg, (x,y))
done = False
while not done:
for event in pg.event.get():
if event.type == pg.QUIT:
pg.quit()
quit()
# call the function
showImg(10,10)
pg.display.update()
pg.quit()
quit()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us