xpos = int(screenpos[0] + ix * x_step + border)