improved grid lines: now wraps when image is translated.