Some context, I want to draw 2D objects by defining a set of pixels to change to a color which represents the shape. For example, if I wanted to draw a square I'd define a top left corner say (0,0), and a bottom right corner say (10,10). Then I'd change the color of all the pixels x values 0-10 with y values 0-10.
Unfortunately I don't have a solid step by step method to complete this, and am only able to draw squares/rectangles due to how simple they are.
Is there a method you can describe, or a resource that describes how to do this you can point me to, which will help me draw shapes other then squares and rectangles?
pseudo code, or a basic implementation of this in C, or java would be very helpful. Also, just a thorough description of how this would be achieved would also be helpful.