I did it like this because I wanted to create the drawing loop as efficient as possible, without switches or conditionals. That method gets executed per pixel so the less logic the better.
If someone knows a better way I'm all ears!
If someone knows a better way I'm all ears!