Skip to main content
Made the code actually match the results, added alt text to image
Source Link

An argument FOR: (By Example)

var R uint32 = 0xFF0000FF; //:Red pixel
var W uint32 = 0xFFFFFFFF; //:White Pixel.
var Pixels []uint32 = { 
W,W,W,R,R,W,W,W,
W,W,R,R,R,R,W,W,
W,R,R,R,R,R,R,RW,
W,W,W,R,R,W,W,W,   //:8x8 pixel image of " ↑ "
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W, }

Code matches results on screen:

enter image description hereRed arrow pointing up made up of squares

Red arrow would be upside-down if you did NOT use top-left origin.

I can't say if this is "why". Just that, it's a good reason for top-left origin.

An argument FOR: (By Example)

var R uint32 = 0xFF0000FF; //:Red pixel
var W uint32 = 0xFFFFFFFF; //:White Pixel.
var Pixels []uint32 = { 
W,W,W,R,R,W,W,W,
W,W,R,R,R,R,W,W,
W,R,R,R,R,R,R,R,
W,W,W,R,R,W,W,W,   //:8x8 pixel image of " ↑ "
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W, }

Code matches results on screen:

enter image description here

Red arrow would be upside-down if you did NOT use top-left origin.

I can't say if this is "why". Just that, it's a good reason for top-left origin.

An argument FOR: (By Example)

var R uint32 = 0xFF0000FF; //:Red pixel
var W uint32 = 0xFFFFFFFF; //:White Pixel.
var Pixels []uint32 = { 
W,W,W,R,R,W,W,W,
W,W,R,R,R,R,W,W,
W,R,R,R,R,R,R,W,
W,W,W,R,R,W,W,W,   //:8x8 pixel image of " ↑ "
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W, }

Code matches results on screen:

Red arrow pointing up made up of squares

Red arrow would be upside-down if you did NOT use top-left origin.

I can't say if this is "why". Just that, it's a good reason for top-left origin.

Source Link

An argument FOR: (By Example)

var R uint32 = 0xFF0000FF; //:Red pixel
var W uint32 = 0xFFFFFFFF; //:White Pixel.
var Pixels []uint32 = { 
W,W,W,R,R,W,W,W,
W,W,R,R,R,R,W,W,
W,R,R,R,R,R,R,R,
W,W,W,R,R,W,W,W,   //:8x8 pixel image of " ↑ "
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W,
W,W,W,R,R,W,W,W, }

Code matches results on screen:

enter image description here

Red arrow would be upside-down if you did NOT use top-left origin.

I can't say if this is "why". Just that, it's a good reason for top-left origin.