Use floor() instead of truncation to make integer pixel coordinates.

If truncation rounds negative numbers toward 0, it can make the top
pixel of a tile brighter than it should be.