I have a pygame mask of a text surface that I would like to invert, in the sense that the black becomes white, and the white becomes black. The black is the transparent part of the text, and the white is the non-transparent part, but I'd like it flipped so I can make a text outline. I can't really figure it out. If anyone knows, it would be much appreciated
Ill attach the code that generates and blits the mask :)
location_text = self.font.render(self.location, True, self.text_color)
pos = ((screen_width - location_text.get_width()) / 2, 320)
mask = pygame.mask.from_surface(location_text)
mask_surf = mask.to_surface()
mask_surf.set_colorkey((0, 0, 0))
screen.blit(mask_surf, (pos[0], pos[1]))
