fdo#77987, part 3: use signed ints consistently

everywhere where snap line coords are manipulated

Change-Id: I8de1662680bd6e5dc9d42d633fa591dacc260a9b