I am trying to convert from deprecated g.Pixel code to RGBSurface.Pixel code, and it seems to be much longer and more complicated. The below two snippets of code work, and are equivalent. Is there an easier way to convert from a Pixel to a RGBSurface.Pixel?
This is just a demonstration program for a colleague. He wanted to know how to change the colour of 1-pixel, and the older code conveniently did this in one line.
Yep, drawing a rectangle 1 pixel in size would work too.
Or you could create a picture the same size as the graphics object, draw into its RGBSurface, and then draw the picture into the original graphics object.