Clip to tile boundaries when stitching.

Prior to this, lines that crossed the tile boundary would get
drawn twice, once for each side, and would end up brighter
as a result.