Improved sprite render, and gradient utility

Sprites will now not try to draw when outside the bounds of the game
window, this has a huge effect on performance. Improved the gradient
function which was confusing before since I ported it over form another
project I was using.