0

So I am making a connect-4 game in pygame, and I want to make the counters customizable with images that are stored within the same directory as the code.

However, I am unsure of how to place the image into the drawn circle and NOT a drawn pattern.

Here is the section of code that creates the circle and fills the colour of the circle:

[...]
circle_surf = pygame.draw.circle(screen, red_colour,
              (int(column*square+square/2),
              height - int(row*square+square/2)), radius)
[...]

I have tried the following code but I think that I am structuring it incorrectly:

[...]
image = pygame.image.load("Exit.png").convert_alpha()
masked_result = image.copy()
masked_result.blit(circle_surf, (0, 0), None, pygame.BLEND_RGBA_MULT)
circle_surf.blit(masked_result, (0, 0))
pygame.mask.from_surface(circle_surf)
[...]
K.K. LAD
  • 1
  • 1

0 Answers0