I am working on a project that will print before the bitmap (more specifically RAW, but this is not important for the question), but I work in a two-dimensional in-program array.
I want to be able to draw a line from point (a, b) to point (x, y) for any arbitrary values ββof a, b, x and y. I don't need anything like smoothing; at this moment the closest neighbor is good. for example, suppose I have a 5x5 2d array, for example:
00,10,20,30,40 01,11,21,31,41 02,12,22,32,42 03,13,23,33,43 04,14,24,34,44
Now, let's say I want to draw a line between 04 and 42. I want the method to come up with something like this reliably:
0,0,0,0,0 0,0,0,0,0 0,0,0,1,1 0,1,1,1,0 1,1,0,0,0
I'm sure someone thinks "guh, is this guy retarded?" He could not here? "but please humorous please!
I work in C ++, but this should be secondary to the actual issue.