I’m looking for method that allow me to draw single pixel on display screen. For example when I click mouse, I want the position of clicked pixel to change color. I know how to read mouse pos, but I could not find simple pixel draw ( there is screen.fill method but it’s not working as I want).
Share
You can do this with
surface.set_at():You can also use
pygame.gfxdraw.pixel():Do note, however, the warning:
You could use
surface.fill()to do the job too:You can also simply draw a line with the start and end points as the same: