“pygame.draw.rect ()” Kode Jawaban

pygame menggambar sintaksis rect

pygame.draw.rect(SURFACE, RGB_COLOR, (X, Y, WIDTH, HEIGHT))
grimmigerFuchs

pygame.draw.rect ()

gameDisplay = pygame.display.set_mode((width,height))
bright_blue =(0,255,255)

# draw rectangle 
pygame.draw.rect(gameDisplay, bright_blue ,(611,473,100,50))
Bright Badger

cara menggambar persegi panjang di pygame

# Importing the library
import pygame
  
# Initializing Pygame
pygame.init()
  
# Initializing surface
surface = pygame.display.set_mode((400,300))
  
# Initialing Color
color = (255,0,0)
  
# Drawing Rectangle
pygame.draw.rect(surface, color, pygame.Rect(30, 30, 60, 60))
pygame.display.flip()
Grieving Gentoo

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya